1

I try to crop the PDF file using the command pdfcrop --hires 1525503522236.pdf 1525503522236_cropped.pdf I get the cropped PDF, but the cropped PDF file is not valid when opened in InDesign or Acrobat. This problem only occurs when the PDF file has only a single character (i): enter image description here

  • the above figure is pdf before crop – jagannathan jothi May 5 '18 at 7:31
  • i get the following error when open the cropped pdf in acrobat **The dimensions of this page are out of range. Page content might be truncated. ** – jagannathan jothi May 5 '18 at 7:36
  • @egreg PDF/PostScript units are points with 72 points = 1 in. Thus, 3 units = 3 bp = 3.01125 pt (TeX points). – Heiko Oberdiek May 5 '18 at 10:30
  • @egreg 0.04in is annotated with "approximately" in the reference. The exact value is 0.0416666... in. – Heiko Oberdiek May 5 '18 at 10:41
2

The reason can be a too small media size, see the comments to the question. The PDF reference says in "Appendix C.2 Architectural Limits":

The minimum page size should be 3 by 3 units in default user space; the maximum should be 14,400 by 14,400 units. In versions of PDF earlier than 1.6, the size of the default user space unit was fixed at 1/72 inch, yielding a minimum of approximately 0.04 by 0.04 inch and a maximum of 200 by 200 inches. Beginning with PDF 1.6, the size of the unit may be set on a page-by-page basis; the default remains at 1/72 inch.

I have some doubts that unit changes of PDF 1.6+ are supported by all the PDF viewers. Therefore, I suggest a different workaround, the procedure:

  1. The image can be scaled:

    a) TeX level with \mag, for example:

    \mag=10000 % permille
    \documentclass[border=2pt]{standalone}
    \begin{document}
      \textit{i}
    \end{document}
    

    b) Create a TeX document that includes the scaled image:

    \documentclass{standalone}
    \usepackage{graphicx}
    \begin{document}
      \includegraphics[scale=10]{uncropped.pdf}
    \end{document}
    
  2. Then, the image can be cropped:

    pdfcrop --hires --margin .1 scaled-uncropped.pdf cropped.pdf
    

    The bounding box depends on the resolution (curves, sharp corners). Therefore, I have added a safety margin to avoid that some pixels are cropped. Adapt to your needs.

  3. Finally, the cropped image can be included with the reverse scale factor:

    \includegraphics[scale=.1]{cropped.pdf}
    
  • \mag=10000 give big font size pdf. Actual font size pdf not generated. I used 9.5pt as font size and 11.5pt is a leadding – jagannathan jothi May 25 '18 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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