Over a million developers have joined DZone.

Creating PostScript from *tex

DZone's Guide to

Creating PostScript from *tex

Latex is a common format for scientific and technical documents. Creating PostScript from it is an essential, but unnecessarily time-consuming task fraught with errors. This workaround will cut down on the time you commit to the process.

Free Resource

Discover 50 of the latest mobile performance statistics with the Ultimate Guide to Digital Experience Monitoring, brought to you in partnership with Catchpoint.

Creating a PostScript file from the *tex sources can be time consuming.

The common option is to convert tex -> dvi using latex, and then dvi -> ps using a comment such as:

$ dvips -y 1200 -o main.ps -p 5 -n 3 main.dvi

In fact, traditionally it has always been tex -> dvi -> pdf.  However, latex command often gives errors and issues in including the images, such as the below:

! LaTeX Error: Cannot determine size of graphic in deployments.png (no Bounding Box)

(See here.)

Using pdflatex package avoids the issue with the images in tex to PDF conversion, but not a way to create a .dvi or .ps.

The option is to use tex -> pdf -> ps, using pdflatex and pdftops, e.g., 

$ pdftops -level3 main.pdf main.ps

which produced 18.2 MB of .ps for a .pdf of 863.6 kB.

For the same PDF,

$ pdftops -binary -level3 main.pdf main.ps

produced a ps output of 14.6 MB, the smallest size I was able to go to without making the ps unreadable.

The output ps is still not perfect, and the other packages and options provided an even worse ps.

Is your APM strategy broken? This ebook explores the latest in Gartner research to help you learn how to close the end-user experience gap in APM, brought to you in partnership with Catchpoint.

pdf ,latex

Published at DZone with permission of Pradeeban Kathiravelu, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}