Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an external 100 pages PDF document (not created by pdflatex) that I \includegraphics page-wise into a beamer presentation. The external PDF document employs white as page color, but I need the background to be transparent.

Ideally, this would be an option one could pass to \includegraphics – which I doubt to exist. However, I would also be open for some process involving external tools (pdftk, pdfjam, ImageMagick, Acrobat...).

share|improve this question

1 Answer 1

I'm not sure about turning anything to transparent in a PDF. PDF is not an image format, so I guess the only way is to remove the background object entriely from the pages. You could do that manually (on every page) with Acrobat professional (and probably also some free pdf editors), but if you're lucky, the following may work:

  1. Convert your PDF into something readable with qpdf -qdf file.pdf file-redable.pdf.
  2. Look in there for the background object. (Luck needed at this point) More often than not, it will look somewhat like this:

    10 765.75 591.75 -729.75 re
    f
    

    That is, a filled rectangle large enough to cover the whole page.

  3. Experimentally remove it.

  4. Fix the resulting pdf with fix-qdf file-redable.pdf.
  5. Try whether it worked ;-)
  6. If you found the right object to remove, you can remove it in all places simultaneously with sed, for instance.
share|improve this answer
    
Aye. This may also be possible with Inkscape or Illustrator. –  Martin Schröder Mar 31 '12 at 18:37
    
Thanks Stephan! While I managed to find the MacPorts package for qpdf, I have not yet found a tool named fix-pdf. Searching for it reveals a commercial Windows-only tool (fixpdf.org), which, however, does not look like being a command-line utility. Is that the one you refer too? –  Daniel Apr 2 '12 at 11:11
    
@Daniel Argh, sorry. Typo. I meant fix-qdf which is part of the qdf bundle and responsible for fixing things like object tables after a "qdf" file has been edited. –  Stephan Lehmke Apr 2 '12 at 11:59
    
:-) I have edited this also in your answer, so (after a while) we can delete these comments. As soon as I find some time I will try your suggestion. –  Daniel Apr 2 '12 at 13:08
    
Unfortunately, I have not yet been able to find the background object. (The PDF in question is generated under Windows with OpenOffice 3.x from an OO presentation). –  Daniel Apr 3 '12 at 15:51

Your Answer

 
discard

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.