I wish to include a pdf graphic generated by a third-party scientific code in a LaTeX file. The problem: the pdf graphic has a bounding box issue. When the pdf graphic is opened---along with the resulting LaTeX-generated pdf which includes it---I get the following popup error in Acrobat Reader: "The font XYZ contains a bad /BBox"

I don't control the third-party software that generates this image and thus can't generate a vector graphic from it besides using its built-in capabilities. Yes, I could take a screenshot but this needs to be vector-quality.

Is there a way to sanitize such a pdf graphic to remove the bounding box issue before including in LaTeX?

  • 3
    You could put it through some PDF tool like Ghostscript or pdftk. The latter claims to be able to fix issues. Apr 19 '12 at 17:36
  • 1
    As it seems you don't need an automatic process, did you try opening the original PDF in inkscape and exporting it again, probably best using PDF version 1.4 instead of 1.5?
    – Christian
    Apr 20 '12 at 13:32
  • @Christian Inkscape performed the job perfectly. Many thanks.
    – Deaton
    Apr 20 '12 at 18:32
  • 1
    I'll make it an answer then I guess.
    – Christian
    Apr 20 '12 at 22:47

Open the PDF that is to be embedded in Inkscape and save it again, choosing PDF as the output format. In the dialog window that then pops up, choose PDF version 1.4.

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.