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.
Join the DZone community and get the full member experience.Join For Free
Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.
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)
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.
Published at DZone with permission of Pradeeban Kathiravelu, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.