aminophen/gentombow

compability with the new LaTeX pdfmanagement

Opened this issue · 3 comments

in connection with the project "Tagged PDF" we are
extending the support for pdf related commands in the LaTeX kernel.

The new code is in part already in the kernel (in l3pdf and l3kernel)
and in part in a temporary testphase package pdfmanagement-testphase.

Most importantly: with the new code we want to replace a few primitives
which write to central dictionaries and resources in the pdf by a new
managed command to prevent clashes between packages and kernel code.
This means that packages which use one of \pdfinfo, \pdfcatalog,
\pdfpageattr, \pdfpagesattr or \pdfpageresources (and analog commands
of the other engines) are incompatible with the new pdfmanagement.

This affects gentombow which uses \pdfpageattr to set CropBox and similar.

If the pdfmanagement is detected/active this should be replaced by e.g.

\ExplSyntaxOn
\pdfmanagement_add:nnn {Pages}{CropBox}{[92~114~523~780]}
%or
\pdfmanagement_add:nnn {Page}{CropBox}{[92~114~523~780]}
\ExplSyntaxOff

It also affects other packages like the pdfx package, so it could be necessary to check dependencies.

The documentation can be found in pdfmanagement-testphase.pdf and l3pdfmanagement.

Please ask if there is any question!

Thanks for your information.

This means that packages which use one of \pdfinfo, \pdfcatalog,
\pdfpageattr, \pdfpagesattr or \pdfpageresources (and analog commands
of the other engines) are incompatible with the new pdfmanagement.

Hmm...

  • Does this affect other users who use \pdfinfo etc directly in their source file? Such a convention has been widely used around the world (the hyperref package contains too huge redefinitions, which sometimes conflict with journal-oriented document classes.)
  • Will the new pdf management system become available outside pdfLaTeX/LuaLaTeX, especially for DVI mode? My package supports dvips and dvipdfmx, so that matters.

Does this affect other users who use \pdfinfo etc directly in their source file?

Not much more than now. I mean if a document issues two \pdfinfo{/Title (TitleA)} and \pdfinfo{/Title (TitleB)} then you get a duplicate in the pdf which is invalid. This can happen currently quite easily if hyperref is involved or if some class or package uses \pdfinfo. (see latex3/hyperref#99).

The pdfmanagement will not make this worse. But if everyone switches to the pdfmanagement and uses \pdfmanagement_add:nnn{Info}{Title}{Title ...} then there will be no longer duplicates, as only the last entry will be added to the pdf.

Will the new pdf management system become available outside pdfLaTeX/LuaLaTeX, especially for DVI mode?

It is already. We support in l3backend and in the additional backend in pdfmanagement xelatex, latex+dvipdfmx and latex+dvips. latex+dvips isn't complete yet (support for form Xobjects is missing) and it is not possible to set the pdfversion in the document with it, and it has only be tested with ps2pdf and not with distiller so the last could error (it does in at least one case, I just got a message about it).

I mean if a document issues two \pdfinfo{/Title (TitleA)} and \pdfinfo{/Title (TitleB)} then you get a duplicate in the pdf which is invalid.

Thanks. So, the new pdfmanagement does not completely solve the original issue but is intended to make the situation better. Now I got it.

additional backend

Nice. I have Adobe Distiller too, so I can test some if you can provide some test cases, including PDF/X etc validation.