I am finishing my doctoral dissertation using XeLaTeX and facing the requirement to submit a PDF/A compliant document.

First, I want to emphasize that I have found and read several related posts (e.g. this and this). The solution based on using pdfx package seems not to be working with XeLaTeX and produces a series of errors starting with "Undefined control sequence. \pdfminorversion". So, I have pretty much followed this tutorial and succeed to generate a PDF/A compliant document using Ghostscript.

However, I can do this only when not using hyperref package or when it is called with the option draft. Like that, I obtain a PDF/A document without nice stuff: bookmarks, links and the option to be opened with 100 % zoom. When I try doing the same thing with hyperref package and option pdfa, I get this error when running Ghostscript: "Annotation set to non-printing, not permitted in PDF/A, reverting to normal PDF output". The links and bookmarks are kept, but 100 % zoom is not. (This is similar as when e.g. Word 2007 builds a PDF/A document.) But the file I obtain is not a PDF/A file.

This is how I call hyperref package from the preamble:

            pdfauthor={My Name},
            pdftitle={My Title},
    \hypersetup{pdfstartview={XYZ null null 1.00}}

My question is how to keep the links and bookmarks, and if possible 100 % zoom, and get PDF/A file. Is it possible to set the options in hyperref package to accomplish something like that using XeLaTeX and, eventually, Ghostscript?


The latest version (1.5.8) of the pdfx package has been used to create valid PDF/A documents using XeLaTeX. However there are some difficulties.

Firstly, you must use an invocation of:

xelatex -shell-escape -output-driver="xdvipdfmx -z 0" <filename>

which means that the resulting PDF uses no compression, so can be more than 10x the size that it would be otherwise, if compression were used. This is because PDF/A does not allow the Metadata packet to be compressed, but there is currently no way to apply compression (or non-compression) selectively. (The -shell-escape is to allow use of texlua to generate some required information.)

Secondly, particularly when using CJK fonts, there seems to be no way to generate a valid /CIDToGIDMap. If this assertion is incorrect, then please let me know how, so I can include appropriate procedures in the next version of pdfx.sty. There is the possibility of setting /CIDToGIDMap /Identity but how does one determine whether this is appropriate?

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.