[XeTeX] Σχετ: Plain XeTeX, pdftitle, pdfinfo

Ross Moore ross.moore at mq.edu.au
Thu Jul 14 00:35:18 CEST 2016


On Jul 11, 2016, at 7:59 PM, Zdenek Wagner <zdenek.wagner at gmail.com<mailto:zdenek.wagner at gmail.com>> 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 at Subject  and  \xmp at 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 at numcoords{/N 4}% for CMYK colors
   \immediate\pdfobj stream attr{\pdfx at numcoords} file %
     {\pdfx at CMYKcolorprofiledir\pdfx at cmyk@profile}%
   \edef\OBJ at CMYK{\the\pdflastobj\space 0 R}%

Then that object reference in \OBJ at CMYK  is required for the  OutputIntent .
viz.

  \def\pdfx at outintent@dict{%
    /Type/OutputIntent
    /S/GTS_PDFX^^J
    /OutputCondition (\pdfx at cmyk@intent)^^J
    /OutputConditionIdentifier (\pdfx at cmyk@identifier)^^J
    /Info(\pdfx at cmyk@intent)^^J
    /RegistryName(\pdfx at cmyk@registry)
    /DestOutputProfile \OBJ at CMYK
   }%

which is linked to the PDF Catalog via:

 \immediate\pdfobj{<<\pdfx at outintent@dict>>}%
  \edef\pdfx at outintents{[\the\pdflastobj\space 0 R]}%
 \def\pdfx at outcatalog@dict{%
  /ViewerPreferences <</DisplayDocTitle true >>
  /OutputIntents \pdfx at outintents % needs appropriate expansion
 }%
 \pdfcatalog{\pdfx at outcatalog@dict}%


Of course you need to supply all the information for the macros:
  \pdfx at cmyk@….
and  \pdfx at CMYKcolorprofiledir  (possibly empty).


Using XeTeX there is similar coding using  \special s,
including symbolic names for object references.
e.g.

    \def\OBJ at CMYK{@colorprofile}%
    \special{pdf:fstream @colorprofile %
      (\pdfx at CMYKcolorprofiledir\pdfx at cmyk@profile) <<\pdfx at numcoords >>}
   \def\pdfx at outintents{ @outintentsarray }%
   \def\pdfx at outintentref{ @outintent at dict }%
   \immediate\special{pdf:obj \pdfx at outintentref << \pdfx at outintent@dict >>}
   \immediate\special{pdf:obj \pdfx at outintents [ ]}%
   \immediate\special{pdf:put \pdfx at outintents \pdfx at outintent@dict}%

with \pdfcatalog defined appropriately:

 \def\pdfx at 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: ross.moore at mq.edu.au<mailto:rick.minter at mq.edu.au>

http://www.maths.mq.edu.au<http://mq.edu.au/>


[cid:image001.png at 01D030BE.D37A46F0]<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/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20160713/7023b3dc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4605 bytes
Desc: image001.png
URL: <http://tug.org/pipermail/xetex/attachments/20160713/7023b3dc/attachment-0001.png>


More information about the XeTeX mailing list