2

I use dvips and ps2pdf and want to add something (Properties) to the page resource dictionary. I know how to add something to the documents catalog:

\special{ps: mark {Catalog} <<
... what I want to add ...
\>> /PUT pdfmark}

I know under xelatex @resources can be used for the page resource dictionary and @catalog for the catalog. But with dvips and ps2pdf it seems that {Resources} can not be used.

But how can I add something to the page resource dictionary using dvips and ps2pdf?

2
\special{ps: mark {ThisPage} <<
  /Resources <<...>>
>> /PUT pdfmark}

Unfortunately, there is no built-in deeper-level named object than {ThisPage} available with pdfmarks. So you can only overwrite/create a page resource dictionary rather than add something to it. Overwriting the resources dictionary of the page is dangerous as it may lead to corrupt PDF.

However, if you insert XObjects previously created with BP&EP or NI pdfmarks into the page using the SP pdfmark, those are automatically added to the page resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.