This question is made to accompany the existing question: How can I create a pdf document exactly as big as my tikz picture?.
Constraints:
- It is not allowed to use
pdfcrop
by any means whatsoever. It is becausepdfcrop
takes a significant amount of time as explained in Searching for a better workflow to get a cropped PDF and EPS graphics – Stage 2. - Manually calculating a tight paper dimension and other related dimensions is not allowed. For example, the solution for the first case in this link is not allowed because the margin is manually setup to avoid the top and bottom parts get cropped accidently.
-
Neither
BatchA.bat
norBatchB.bat
is allowed because they produce big PDF and EPS files. Any variants of them might not be allowed as well. But they might be allowed if there is a way to reduce the file size, at least the same as the file size produced bylatex->dvips->ps2pdf->pdfcrop
.BatchA.bat
:latex -interaction=nonstopmode %1 dvips -R -t unknown -E %1 -o %1-temp.eps epstool --copy --bbox %1-temp.eps %1.eps epstopdf --hires %1.eps
BatchB.bat
:latex -interaction=nonstopmode %1 dvips -R -t unknown %1 -o %1-temp.ps ps2eps %1-temp.ps epstool --copy --bbox %1-temp.eps %1.eps epstopdf --hires %1.eps
How can I create PDF and EPS exactly as big as my PSTricks picture without breaking the constraints above?
Best Answer
You can't. Not if you meanby the size of graphic you mean the rectangle around all the print. The postscript graphics are calculated by the postscript interpreter (e.g. dvips) after the (La)TeX run. So LaTeX has absolutly no chance to know where all the black or colored ink points will be.
You can try dvips -E but as the documentation says to the -E option: