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.

After compiling the document below:

\documentclass[letterpaper]{article}
\usepackage{background}
\usepackage{lipsum}
\newcommand{\edpeercopyright}[2]{%
      {\small\color{black}Copyright \copyright\ 2013 edpeer.org \textregistered. Unauthorized photocopying is prohibited.}\quad{\color{#1}\rule{#2}{3pt}}%
    }
\backgroundsetup{%
                contents={\edpeercopyright{red}{5cm}},
                angle=90,
                position={-1.5,-5},%
                opacity=1,
                scale=1
                }
\begin{document}
\lipsum[2]
\end{document}

I get the following error upon exiting the pdf file generated:

! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state - .\mupdf\source\pdf\pdf-interpret.c:3044: Ignoring errors during rendering ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state - .\mupdf\source\pdf\pdf-interpret.c:3044: Ignoring errors during rendering ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@CA1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state ! .\mupdf\source\pdf\pdf-interpret.c:2542: cannot find extgstate resource 'pgf@ca1' ! .\mupdf\source\pdf\pdf-interpret.c:2825: cannot set graphics state

Why is this? Something tells me its the command \edpeercopyright.

share|improve this question
    
It renders well in TeXmaker Integrated PDFviewer of why not use it ? Are you with Sumatrapdf 2.4 latest –  texenthusiast Oct 17 '13 at 23:28
    
@texenthusiast Yes am using the latest versions of both texmaker and sumatrapdf. –  azetina Oct 17 '13 at 23:30
    
does this happen with a super minimal document, or just with all the stuff you have now –  Mr Komandez Oct 18 '13 at 1:27
    
@MrKomandez tex.stackexchange.com/a/130388/10898 This compiles well, though. –  azetina Oct 18 '13 at 1:33
    
i don't get an error when I compile and open then close in sumatrapdf. where is this error being displayed? –  Mr Komandez Oct 18 '13 at 4:14

1 Answer 1

The pdf produced is buggy: It references an ExtGState pgf@CA1, but does not define it.

Please report the bug to the authors of the background package, although I suspect a bug in pgf.

share|improve this answer
    
It seems ok to me in pgfsys-common-pdf.def file. How do you check if it is buggy? (Out of curiosity) –  percusse Oct 18 '13 at 20:51
    
@percusse: qpdf -qdf and look at the pdf. The content stream of the page references the ExtGState pgf@CA1, but the /ExtGState dict in the /Resources is empty. –  Martin Schröder Oct 18 '13 at 21:31
    
Does it have the same when you use opacity=0.5, ? I can't get my head around this yet. –  percusse Oct 18 '13 at 21:35
    
@percusse: Yes. Make sure that \pgfutil@addpdfresource@extgs has the right definition and is eventually called at the right place. You can debug this with \pdfcompresslevel0. –  Martin Schröder Oct 18 '13 at 21:38
    
I will surely submit the report if you have not done it. –  azetina Oct 19 '13 at 0:35

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.