I have a PDF document created from the following input file.
\documentclass[cmyk,a4paper]{minimal}
\usepackage{geometry,xcolor}
\pagecolor{cyan}
\parindent=0bp
\begin{document}
\fbox{$\displaystyle E=mc^2$}
\end{document}
But it cannot be cropped by pdfcrop because of the non-white background. I think the non-white background has affected the bounding box. So how to fix this isssue?
Confirmation
The pdfcrop author said in Martin's and Lev's reports as follows:
The PDF format does not know a "page color". pdftex.def implements it by putting a colored box as first thing on the page. Thus it is not quite clear for a program what kind of boxes are valuable content and what could be cropped.
To get a properly cropped image, you can run the TeX document without \pagecolor and run gs -sDEVICE=bbox -dBATCH -dNOPAUSE test.pdf to get the bounding box data. It you are using hyperref, you can use the Bounding Box data for option pdfpagescrop. Or run pdfcrop with option --box and the Bounding Box data.
-- Heiko Oberdiek

pdfcropusesgs -sDEVICE=bboxinternally to get the bounding box information. The page color might be created by a large colored rectangle in the background, which is then taken as part of the bounding box by Ghostscript. I would look for options for it to maybe ignore certain colors. Or you try to feed the bounding box data to it manually, i.e. by creating an identical file without page colors and take this as reference. – Martin Scharrer Jul 13 '11 at 09:06\pagecolordoesn't work withpreview(and therefore not withstandalone). – Martin Scharrer Jul 13 '11 at 09:23comp.text.tex. I liked to see what other people think about it before opening a full bug report. – Martin Scharrer Jul 14 '11 at 07:20/WhiteIsOpaque(defaultfalse) that tells it to ignore, eg, a white rectangle in the background. With gs8.71 setting thistruegives same non-cropping as you saw with gs9.00. So, with gs8.71 "white" covered various colours, whereas with gs9.00 "white" really seems to mean white. – Lev Bishop Jul 15 '11 at 17:55