On Jul 11, 2016, at 7:59 PM, Zdenek Wagner
<[email protected]<mailto:[email protected]>> wrote:
Especially this one, it depends on a lot of files. I wanted to extract ideas
how to build the XMP, how to include the ICC but I gave up.
XMP is done via a template file; e.g. pdfx.xmp or pdfa.xmp .
There are many places where information can be supplied, via macros
such as \xmp@Subject and \xmp@Author .
Much of the pdfx package is about supplying values for these, in UTF8
encoding.
I know, writing XMP is easy, I do not know how to include it. I do not like to
use hyperref for a document that will only be pronted and never will be online.
Using pdfTeX it is done like this in pdfx.sty :
\def\pdfx@numcoords{/N 4}% for CMYK colors
\immediate\pdfobj stream attr{\pdfx@numcoords} file %
{\pdfx@CMYKcolorprofiledir\pdfx@cmyk@profile}%
\edef\OBJ@CMYK{\the\pdflastobj\space 0 R}%
Then that object reference in \OBJ@CMYK is required for the OutputIntent .
viz.
\def\pdfx@outintent@dict{%
/Type/OutputIntent
/S/GTS_PDFX^^J
/OutputCondition (\pdfx@cmyk@intent)^^J
/OutputConditionIdentifier (\pdfx@cmyk@identifier)^^J
/Info(\pdfx@cmyk@intent)^^J
/RegistryName(\pdfx@cmyk@registry)
/DestOutputProfile \OBJ@CMYK
}%
which is linked to the PDF Catalog via:
\immediate\pdfobj{<<\pdfx@outintent@dict>>}%
\edef\pdfx@outintents{[\the\pdflastobj\space 0 R]}%
\def\pdfx@outcatalog@dict{%
/ViewerPreferences <</DisplayDocTitle true >>
/OutputIntents \pdfx@outintents % needs appropriate expansion
}%
\pdfcatalog{\pdfx@outcatalog@dict}%
Of course you need to supply all the information for the macros:
\pdfx@cmyk@….
and \pdfx@CMYKcolorprofiledir (possibly empty).
Using XeTeX there is similar coding using \special s,
including symbolic names for object references.
e.g.
\def\OBJ@CMYK{@colorprofile}%
\special{pdf:fstream @colorprofile %
(\pdfx@CMYKcolorprofiledir\pdfx@cmyk@profile) <<\pdfx@numcoords >>}
\def\pdfx@outintents{ @outintentsarray }%
\def\pdfx@outintentref{ @outintent@dict }%
\immediate\special{pdf:obj \pdfx@outintentref << \pdfx@outintent@dict >>}
\immediate\special{pdf:obj \pdfx@outintents [ ]}%
\immediate\special{pdf:put \pdfx@outintents \pdfx@outintent@dict}%
with \pdfcatalog defined appropriately:
\def\pdfx@catalog@xetex#1{\special{pdf:put @catalog <<#1>>}}
You should be able to put all the pieces together now.
Cheers,
Ross
Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz<http://icebearsoft.euweb.cz/>
Dr Ross Moore
Mathematics Dept | Level 2, S2.638 AHH
Macquarie University, NSW 2109, Australia
T: +61 2 9850 8955 | F: +61 2 9850 8114<tel:%2B61%202%209850%209695>
M:+61 407 288 255<tel:%2B61%20409%20125%20670> | E:
[email protected]<mailto:[email protected]>
http://www.maths.mq.edu.au<http://mq.edu.au/>
[cid:[email protected]]<http://mq.edu.au/>
CRICOS Provider Number 00002J. Think before you print.
Please consider the environment before printing this email.<http://mq.edu.au/>
This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views expressed
in this message are those of the individual sender, and are not
necessarily the views of Macquarie University.<http://mq.edu.au/>
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex