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.

The following TeX code is intended to change the background color of an external pdf file by using the pdfpages package, but it does not work for me. Does it work at all?

\documentclass{minimal}
\usepackage{xcolor}
\pagecolor[HTML]{B0A030}
\usepackage{pdfpages}
\begin{document}
\includepdf[fitpaper,pages=-]{external/notes.pdf}
\end{document}
share|improve this question
    
It works for me. What distribution and version are you using? –  N.N. Dec 26 '11 at 8:12
    
I am using all the latest versions of everything, but it seems that the problem is actually with the way the original pdf file is produced as it works for some files and not for others. Ironically in the end I got the background color of the original file changed using the accessibility option in acrobat reader (9.0 +). This seems like a better option if you want to change the background color of all pages. I found the solution here link –  Nimonika Dec 26 '11 at 8:33
    
Could you please show how to produce an external pdf that does not work here? –  N.N. Dec 26 '11 at 8:36
9  
If the old PDF file has already a background color, it's impossible to change it by superimposing the pages to a differently colored background. The method in your example will work only if the old PDF file has no background color. –  egreg Dec 26 '11 at 15:10
1  
In order for this to be resolved, post notes.pdf somewhere for people to download and experiment with. Try FileDropper or DropBox. –  Werner Dec 26 '11 at 21:50

1 Answer 1

As egreg notes in his comment, it will not be possible to change the background of the pdf file if the file has non transparent background to start with. In that case, I think the only way to do it is edit the file in a pdf editor (Adobe Acrobat, od pdfedit on linux, and either change the color of the background element on each page, or delete each background element, and then use pdfpages to change the background color.

share|improve this answer

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.