编译后的文件如下:
\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}
退出生成的 pdf 文件时出现以下错误:
! .\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
这是为什么?有东西告诉我这是命令\edpeercopyright
。
答案1
生成的 pdf 有缺陷:它引用了 ExtGState pgf@CA1
,但没有定义它。
请将该错误报告给软件包的作者background
,尽管我怀疑其中有一个错误pgf
。