TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is --hires for?

To obtain a better result when cropping a pdf image produced by PSTricks, I use --hires option as follows

latex filename.tex
dvips filename.dvi
ps2pdf -sOutputFile=filename-temp.pdf filename.ps
pdfcrop --hires filename-temp.pdf filename.pdf

According to pdfcrop --help shown in the following screenshot, the --hires make pdfcrop use high resolution bounding box (instead of the usual bounding box) to crop a pdf input.

enter image description here

Scenario & Problem

I am writing a book that use PDF, PNG, JPEG images and PSTricks codes. Actually xelatex can help me to compile the input file. Unfortunately, xelatex runs very very very slowly. The very bad performance makes me reluctant to use xelatex.

The next candidates are pdflatex (and context but I am not familiar with it). Behind the scene, pdflatex with auto-pst-pdf package compiles each PSTrick code, converts it to PDF, crops the surrounding white space of the PDF image, and finally includes all the resulting PDF images to produce a complete document. In this process, there is a temporary PDF file that contains a bunch of the cropped PDF images in the working directory. Unfortunately, the bounding box is not so accurate. If we see each cropped image carefully, we will notice that the left, right, top, and bottom margins are not exactly the same. Therefore, I need to pass --hires to pdfcrop, but I don't know how to do this.

The following code snippet might be needed for a test.

Don't forget to use -shell-escape or --enable-write18 when invoking pdflatex.

\usepackage{auto-pst-pdf}% I need pass --hires, but how ?

\caption{\label{fig:circle}This is a circle.}



Is it possible to force auto-pst-pdf to use --hires option when it internally invokes pdfcrop?

share|improve this question
up vote 3 down vote accepted
share|improve this answer
@xport: that's a typo, I meant ps2pdf. pspdf is an own script. – Herbert Jun 13 '11 at 11:55
@xport: ah, sure. Totally forget, that the keywords can't contain a digit in their names. – Herbert Jun 13 '11 at 12:17
-dAutoRotatePages=/None is mandatory? If I ignore it, what is the problem? – xport Jul 2 '11 at 23:54
When using ghostscript it can be sometimes too clever and rotates an images itself where it shouldn't be rotated – Herbert Jul 3 '11 at 7:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.