[XeTeX] XeTeX - PDF-x1a
Ross Moore
ross.moore at mq.edu.au
Mon Apr 18 05:46:48 CEST 2016
Hi Zdenek, Bruno, Arthur,
Recall this conversation from several months ago?
I've now got 2 important contributions to make.
On 06/09/2015, at 5:47 PM, Zdenek Wagner wrote:
2015-09-06 8:10 GMT+02:00 Bruno Le Floch <blflatex at gmail.com<mailto:blflatex at gmail.com>>:
On 9/4/15, Arthur Reutenauer <arthur.reutenauer at normalesup.org<mailto:arthur.reutenauer at normalesup.org>> wrote:
> On Thu, Sep 03, 2015 at 10:44:19AM -0400, Adam Drissel wrote:
>> I need to be able to use XeTeX while still producing a PDF in x1a format
>> (PDF/A, PDF-x1a). Do you have any idea how I can do this using XeTeX?
>
> Unfortunately it's not really possible at the moment; the package pdfx
> aims at producing different standards of the PDF/A and PDF/X families
> but is aimed at pdfTeX. To my knowledge there has been no serious
> effort to port it to XeTeX.
There has now!
I have successfully produced a validating PDF/A-2u document from
the Serbian version of the TeX-Live documentation for 2015.
As far as I remember from a talk at TUG 2015, the packages used to
produce PDF/A using pdftex were extended to work with LuaTeX (perhaps
using newer versions of the package) and one difficulty they faced
with XeTeX was the lack of a way to compute MD5 sums. Now IIRC a
primitive was very recently added to XeTeX for MD5 sums. So perhaps
it wouldn't be too much work to port the package to XeTeX.
#1
What is the name of this primitive please?
Was it really added?
One place where it was being used by pdfTeX + pdfx.sty
is in generating a UUID; i.e., an identifier that can virtually
be guaranteed to be unique to the document being processed.
It isn't actually needed, for this purpose, but it would save
a significant amount of processing of macro evaluations.
Scott Pakin's coding in hyperxmp emulates a seeded RNG
(random number generator) to generate such a unique ID.
Currently I'm using Scott's coding with XeTeX + pdfx.sty
but the md5 sum primitive would shorten this considerably,
and most likely works much faster.
Luatex and pdftex have the \pdfminorversion primitive to set the required PDF version. AFAIK there is no way how XeTeX could communicate such a requirement to xdvipdfmx. The only way is to call xelatex -no-pdf ... and xdvipdfmx -V4 ... (default is PDF 1.5 but PDX/x-1a:2003 requires PDF 1.4).
#2
There's more to it than just this.
The command-line needs to be (something like):
xelatex -output-driver="xdvipdfmx -z 0" <filename>.tex
This "-z 0" is needed because the XMP Metadata packet must *not*
be compressed, but must remain readable as plain text, in UTF-8 encoding.
With "-z 1" or higher, the Metadata is compressed.
With texlive-sr.pdf the filesize difference is enormous:
~798 kb with "-z 1"
~10.4 Mb with "-z 0"
I've been unable to find a way to specify that parts of the generated PDF
be uncompressed while other parts can be.
I really don't know tbh,
Bruno
Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
If any of the XeTeX Development team can help with either of these
issues, I'd be most appreciative.
And we'd be getting a much better product for generating PDF/A files.
Cheers,
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20160418/2264ca7d/attachment.html>
More information about the XeTeX
mailing list