Converting PS plot from ISIS to PDF

From Remeis-Wiki
Jump to navigation Jump to search

Let's assume you have exported any plot in ISIS into a PostScript (PS) by, e.g.,

 plot_data(1; res = 1);

The resulting PS file will be larger than a corresponding PDF version of your plot. Furthermore, if you attache the PS to an email, some people might have problems viewing this format. Fortunately, there are UNIX tools available for converting the PS into a PDF, like


which will create a new file myfit.pdf in this example. However, the rotation of the final PDF might be wrong. To fix this you can use, e.g., pdftk to rotate the final PDF. A one-liner might look like

 epstopdf --outfile=- | pdftk - cat 1east output myfit.pdf

Note that we set outfile to - which is equivalent to the standard output pipe (STDOUT), i.e., the PDF will be echoed into your shell. We pipe this output to pdftk, which we need to force reading from the standard input channel (STDIN) by providing - as well. The "1east" option rotates the first page of the PDF by 90° clockwise (to the east).