<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hi Zdenek, Bruno, Arthur,
<div><br>
</div>
<div>Recall this conversation from several months ago?</div>
<div><br>
</div>
<div>I've now got 2 important contributions to make.</div>
<div><br>
<div>
<div>On 06/09/2015, at 5:47 PM, Zdenek Wagner wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">2015-09-06 8:10 GMT+02:00 Bruno Le Floch <span dir="ltr"><<a href="mailto:blflatex@gmail.com" target="_blank">blflatex@gmail.com</a>></span>:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">
<span class="">On 9/4/15, Arthur Reutenauer <<a href="mailto:arthur.reutenauer@normalesup.org">arthur.reutenauer@normalesup.org</a>> wrote:<br>
> On Thu, Sep 03, 2015 at 10:44:19AM -0400, Adam Drissel wrote:<br>
>> I need to be able to use XeTeX while still producing a PDF in x1a format<br>
>> (PDF/A, PDF-x1a). Do you have any idea how I can do this using XeTeX?<br>
><br>
> Unfortunately it's not really possible at the moment; the package pdfx<br>
> aims at producing different standards of the PDF/A and PDF/X families<br>
> but is aimed at pdfTeX. To my knowledge there has been no serious<br>
> effort to port it to XeTeX.<br>
</span></blockquote>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>There has now!</div>
<div>I have successfully produced a validating PDF/A-2u document from</div>
<div>the Serbian version of the TeX-Live documentation for 2015.</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">
<span class=""><br>
</span>As far as I remember from a talk at TUG 2015, the packages used to<br>
produce PDF/A using pdftex were extended to work with LuaTeX (perhaps<br>
using newer versions of the package) and one difficulty they faced<br>
with XeTeX was the lack of a way to compute MD5 sums. Now IIRC a<br>
primitive was very recently added to XeTeX for MD5 sums. So perhaps<br>
it wouldn't be too much work to port the package to XeTeX.<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>#1</div>
<div>What is the name of this primitive please?</div>
<div>Was it really added?</div>
<div><br>
</div>
<div>One place where it was being used by pdfTeX + pdfx.sty </div>
<div>is in generating a UUID; i.e., an identifier that can virtually </div>
<div>be guaranteed to be unique to the document being processed.</div>
<div>
<div><br>
</div>
</div>
<div>It isn't actually needed, for this purpose, but it would save </div>
<div>a significant amount of processing of macro evaluations. </div>
<div><br>
</div>
<div>Scott Pakin's coding in hyperxmp emulates a seeded RNG</div>
<div>(random number generator) to generate such a unique ID.</div>
<div>Currently I'm using Scott's coding with XeTeX + pdfx.sty</div>
<div>but the md5 sum primitive would shorten this considerably, </div>
<div>and most likely works much faster.</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>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). <br>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>#2</div>
<div>There's more to it than just this.</div>
<div><br>
</div>
<div>The command-line needs to be (something like):</div>
<div><br>
</div>
<div> xelatex -output-driver="xdvipdfmx -z 0" <filename>.tex</div>
<div><br>
</div>
<div>This "-z 0" is needed because the XMP Metadata packet must *not*</div>
<div>be compressed, but must remain readable as plain text, in UTF-8 encoding.</div>
<div>With "-z 1" or higher, the Metadata is compressed.</div>
<div><br>
</div>
<div>With texlive-sr.pdf the filesize difference is enormous:</div>
<div> ~798 kb with "-z 1"</div>
<div>~10.4 Mb with "-z 0"</div>
<div><br>
</div>
<div>I've been unable to find a way to specify that parts of the generated PDF</div>
<div>be uncompressed while other parts can be.</div>
<div> </div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; position: static; z-index: auto; ">
<br>
I really don't know tbh,<br>
Bruno<br>
<div class="">
<div class="h5"><br>
<br clear="all">
<div>
<div class="gmail_signature">Zdeněk Wagner<br>
<a href="http://ttsm.icpf.cas.cz/team/wagner.shtml" target="_blank">http://ttsm.icpf.cas.cz/team/wagner.shtml</a><br>
<a href="http://icebearsoft.euweb.cz" target="_blank">http://icebearsoft.euweb.cz</a></div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
<div>If any of the XeTeX Development team can help with either of these</div>
<div>issues, I'd be most appreciative.</div>
<div>And we'd be getting a much better product for generating PDF/A files.</div>
<div><br>
</div>
<div><br>
</div>
<div>Cheers,</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>Ross</div>
<div><br>
</div>
<div><br>
</div>
</body>
</html>