[dvipdfmx] \special{pdf:pageresources and named objects

Shunsaku Hirata shunsaku.hirata74 at gmail.com
Wed Aug 7 00:21:41 CEST 2019


Hi Ulrike,

For pdf:pageresources, dvipdfmx tries to merge provided resource
dicrionary to an existing one instead of replacing it, since dvipdfmx
may use its own definitions of resources internally maintained and
wants to preserve it (otherwise output is corrupted).

However, if, like your examples, resource dictionary is provided as
an indirect reference (@testextgs is replaced by an indirect reference
when it is parsed), dvipdfmx can't handle it nicely.
Dvipdfmx need to protect page resources from being overwritten.

I need to consider how to lift this restriction but I guess there must
be some other specials than pdf:pageresources.

Thanks,
Shunsaku Hirata



2019年8月6日(火) 22:39 Ulrike Fischer <news3 at nililand.de>:
>
> Hello,
>
> with \special{pdf:put @resources ...}
> I can without problems use a named object:
>
> \documentclass{article}
>
> \usepackage{l3pdf}
> \ExplSyntaxOn
> \pdf_uncompress:
>
> \ExplSyntaxOff
>
> \begin{document}
> \special{pdf:obj @testextgs <<>>}
> \special{pdf:put @resources << /ExtGState @testextgs >>}
> \special{pdf:put @testextgs << /bearopacity <</ca 1/CA 1>>>>}
> \special{pdf:put @testextgs << /duckopacity <</ca 0.7/CA 0.7>>>>}
> abc
> \end{document}
>
> The resource is filled and added to the page resource:
>
> 8 0 obj
> <</ExtGState 4 0 R/Font<</F1 6 0 R>>/ProcSet[/PDF/Text/ImageC/ImageB/ImageI]>>
> endobj
>
> But when I try the same with the new pdf:pageresources
> the /ExtGState entrie is missing in the resource dictionary:
>
> \documentclass{article}
>
> \usepackage{l3pdf}
> \ExplSyntaxOn
> \pdf_uncompress:
> \ExplSyntaxOff
>
> \begin{document}
> \special{pdf:obj @testextgs <<>>}
> \special{pdf:pageresources <</ExtGState @testextgs>>}
> \special{pdf:put @testextgs << /bearopacity <</ca 1/CA 1>>>>}
> \special{pdf:put @testextgs << /duckopacity <</ca 0.7/CA 0.7>>>>}
> abc
> \end{document}
>
> 8 0 obj
> <</Font<</F1 6 0 R>>/ProcSet[/PDF/Text/ImageC/ImageB/ImageI]>>
> endobj
>
>
> Is this a bug or do I'm using it wrong?
>
> --
> Mit freundlichen Grüßen
> Ulrike Fischer
> mailto:news3 at nililand.de
>
>



More information about the dvipdfmx mailing list