Using the preview package to generate individual PDFs of images within your document has been covered, for example, in this thread. However, I am trying to understand how you can use Ghostscript to output each individual page. To review, the command I use is
\usepackage[active, pdftex, tightpage]{preview}
along with
\begin{preview}
\begin{tikzpicture}
\end{tikzpicture}
\end{preview}
In the linked discussion, it is proposed to use this command
gs -opics%2d.pdf -sDEVICE=pdfwrite file.pdf
However, there are two problems.
- The command does not seem to work. Only a single pdf file is generated and it has multiple pages.
- The generated file seems much smaller than the original file. I am somewhat worried by GS's compression. Is this something to be worried about for files that need to be print-ready? If so, how do you make it so GS outputs something with absolutely no compression over the original?
-dColorImageFilter=/FlateEncode. This is lossless but makes the file larger. Indeed you can't tell it to pass DCT encoded images as unchanged DCT (not reencoded): Adobe Distiller knows a parameterPassThroughJPEGImagesbut gs does not respect this (see item 3.8 in the ghostscript projects page). – Lev Bishop Jul 25 '11 at 22:36