[NTG-pdftex] \pdfpagesresources?

Pawel Jackowski jackos1 at poczta.onet.pl
Mon Jul 4 00:18:48 CEST 2005


Hi Hans,

> i'm not sure if i understand the problem, but as long as adding a top 
> level page resource does not break individual page resources it's fine 
> with me;

The only problem is that if \pdfpageresources toks list is used as 
global (that is probably quite common) in the PDF output we get the same 
code repeated as many times as number of pages in the document.

> i need to check the pdf ref, but do resources in the /Page object 
> overload those on the /Pages one?; 

Resources dictionary is inheritable, but now I see that this inheritance 
is different than for page attributes like page boxes. I thought that if 
some resource can't be found in local dictionary (in /Page) it is 
searched in parent node (/Pages). It seems I was wrong; the following 
produce a corrupted PDF:

\immediate\pdfobj{<</Type /ExtGState /CA 0.3 /ca 0.3>>}
\edef\A{/GS1 \the\pdflastobj\space0 R}
\immediate\pdfobj{<</Type /ExtGState /CA 0.7 /ca 0.7>>}
\edef\B{/GS2 \the\pdflastobj\space0 R}

\edef\next{\pdfpagesattr{/Resources << /ExtGState <<\A>> >>}}\next
\edef\next{\pdfpageresources{/ExtGState <<\B>>}}\next

\pdfliteral{/GS1 gs}blah
\pdfliteral{/GS2 gs}blah

\end

It seems that /Resources dict is inherited from /Pages ONLY if there is 
NO local /Resources dict in /Page object. If resource dict is empty, it 
means that the page requires no resources.

Since pdfTeX always produce /Resources dictionary for each page, the 
\pdfpagesresources makes no sense. Sorry for noise.

Best regards,
-- 
Pawe/l Jackowski
P.Jackowski at gust.org.pl


More information about the ntg-pdftex mailing list