Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is PS Post Script? If it is then there are a lot of options. One of then is ImageMagick, which you can run in command line. It can also convert SVG to EMF, helps when you have to use MS Word.

Is PS Post Script? If it is then there are a lot of options. One of then is ImageMagick, which you can run in command line. It can also convert SVG to EMF, EMF (inkScape can also do it), helps when you have to use MS Word.

A simpler way is to just use GhostScript (the command line is simpler). Here are the steps: 1. Download and install it from the official web : GhostScript 2. Add the "bin" and the "lib" folder of the installed GhostScript to the "PATH" environmental variable. This makes the cmd able to find the utility we need to use later. If you do not add the paths, you can still call the utility by using the full path. 3. After adding to "PATH" (assuming Windows and enough user right), open a cmd window in your target PS file folder. 4. Use the cmd line: "ps2pdf input.ps output.pdf"

There is quite a good tutorial here : How To Convert PostScript (eps/ps) to PDF with Ghostscript on Windows 10

In Python, you could use something like subprocess.run() to run the cmd, or make a buch of cmd strings, wirte them into a temp CMD/BAT file; then use Python to run that temp file and delete it after finish.

The doct for the "ps2pdf" utility is here : https://www.mankier.com/1/ps2pdf#

Is PS Post Script? If it is then there are a lot of options. One of then is ImageMagick, which you can run in command line. It can also convert SVG to EMF (inkScape can also do it), helps when you have to use MS Word.

A simpler way is to just use GhostScript (the command line is simpler). Here are the steps: 1. steps:

  1. Download and install it from the official web : GhostScript 2.
  2. Add the "bin" and the "lib" folder of the installed GhostScript to the "PATH" environmental variable. This makes the cmd able to find the utility we need to use later. If you do not add the paths, you can still call the utility by using the full path. 3. path.
  3. After adding to "PATH" (assuming Windows and enough user right), open a cmd window in your target PS file folder. 4. folder.
  4. Use the cmd line: "ps2pdf input.ps output.pdf"

There is quite a good tutorial here : How To Convert PostScript (eps/ps) to PDF with Ghostscript on Windows 10

In Python, you could use something like subprocess.run() to run the cmd, or make a buch of cmd strings, wirte write them into a temp CMD/BAT file; then use Python to run that temp file and delete it after finish.

The doct for the "ps2pdf" utility is here : https://www.mankier.com/1/ps2pdf#

Is PS Post Script? If it is then there are a lot of options. One of then is ImageMagick, which you can run in command line. It can also convert SVG to EMF (inkScape can also do it), helps when you have to use MS Word.

A simpler way is to just use GhostScript (the command line is simpler). simpler and it's free also, like ImageMagick and inkScape). Here are the steps:

  1. Download and install it from the official web : GhostScript
  2. Add the "bin" and the "lib" folder of the installed GhostScript to the "PATH" environmental variable. This makes the cmd able to find the utility we need to use later. If you do not add the paths, you can still call the utility by using the full path.
  3. After adding to "PATH" (assuming Windows and enough user right), open a cmd window in your target PS file folder.
  4. Use the cmd line: "ps2pdf input.ps output.pdf"

There is quite a good tutorial here : How To Convert PostScript (eps/ps) to PDF with Ghostscript on Windows 10

In Python, you could use something like subprocess.run() to run the cmd, or make a buch of cmd strings, write them into a temp CMD/BAT file; then use Python to run that temp file and delete it after finish.

The doct for the "ps2pdf" utility is here : https://www.mankier.com/1/ps2pdf#