I have the following code in zwpagelayout.sty:
\edef\zwpl@pdftitle{\zwpl@title}
\ifcat$\zwpl@pdftitle$
\ifzwpl@pdfx
\ifcase\zwpl@Driver
\or
\pdfinfo{\zwpl@pdfinfo}
\or
\ifxetex \def\zwpl@crt{XeTeX}\else \def\zwpl@crt{TeX+dvipdfm}\fi
\edef\zwpl@pdfcrt{ /Creator (\zwpl@crt) }
\special{pdf:docinfo << \zwpl@pdfmoddate \zwpl@pdfcrt \zwpl@pdfxinfo >>}
\fi
\fi
\else
\edef\zwpl@pdftitle{/Title (\zwpl@pdftitle)}
\ifcat$\zwpl@author$\def\zwpl@pdfauthor{}\else
\edef\zwpl@pdfauthor{ /Author (\zwpl@author)}\fi
\ifcat$\zwpl@subject$\def\zwpl@pdfsubject{}\else
\edef\zwpl@pdfsubject{ /Subject (\zwpl@subject)}\fi
\ifcat$\zwpl@keywords$\def\zwpl@pdfkeywords{}\else
\edef\zwpl@pdfkeywords{ /Keywords (\zwpl@keywords)}\fi
\edef\zwpl@pdfcreationdate{ /CreationDate \zwpl@modt}
\edef\zwpl@pdfmoddate{ /ModDate \zwpl@modt}
\ifcase\zwpl@Driver
\or
\pdfinfo{\zwpl@pdftitle \zwpl@pdfauthor \zwpl@pdfsubject
\zwpl@pdfkeywords \zwpl@pdfxinfo}
\or
\ifxetex \def\zwpl@crt{XeTeX}\else \def\zwpl@crt{TeX+dvipdfm}\fi
\edef\zwpl@pdfcrt{ /Creator (\zwpl@crt) }
\special{pdf:docinfo << \zwpl@pdftitle \zwpl@pdfauthor
\zwpl@pdfsubject \zwpl@pdfkeywords
\zwpl@pdfmoddate \zwpl@pdfcrt \zwpl@pdfxinfo >>}
\else
\def\zwpl@pdfcrt{ /Creator (TeX+dvips) }
\special{ps:[ \zwpl@pdftitle \zwpl@pdfauthor \zwpl@pdfsubject
\zwpl@pdfkeywords
\zwpl@pdfcreationdate \zwpl@pdfmoddate \zwpl@pdfcrt
/DOCINFO pdfmark}
\fi
\fi
I can see the texts in pdfinfo as well as in Acrobat.
Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml
http://icebearsoft.euweb.cz
2016-07-10 17:38 GMT+02:00 Philip Taylor <[email protected]>:
>
> Jonathan Kew wrote:
>> [Y]ou could generate a minimal .xdv file with xelatex (using -no-pdf) and
>> then examine this with a binary-capable editor/viewer to see what pdf
>> specials have been inserted. Then write plain-based code to generate the
>> same in your xetex document.
>
> Thank you Jonathan -- that may have led me to a solution. I could generate
> the .xdv with no problem, but even looking at it using DVIASM did not give me
> sufficient information to work out what \specials might exist. So instead I
> added the following to my XeLaTeX code :
>
> \let \Special = \special
> \def \special #1{\message {\string \special: [#1]\Special {#1}}}
>
> and this yields in the transcript :
>
> \special: [pdf: put @thispage << /ArtBox [0 0 498.89641 708.65968] >>]\Special
> {pdf: put @thispage << /ArtBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /BleedBox [0 0 498.89641 708.65968]
> >>]\Specia
> l {pdf: put @thispage << /BleedBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /CropBox [0 0 498.89641 708.65968]
> >>]\Special
> {pdf: put @thispage << /CropBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /MediaBox [0 0 498.89641 708.65968]
> >>]\Specia
> l {pdf: put @thispage << /MediaBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /TrimBox [0 0 498.89641 708.65968]
> >>]\Special
> {pdf: put @thispage << /TrimBox [0 0 498.89641 708.65968] >>}
> \special: [pdf:docinfo << /GTS_PDFXVersion (PDF/X-1:2001) /GTS_PDFXConformance
> (PDF/X-1a:2001) >> ]\Special {pdf:docinfo << /GTS_PDFXVersion (PDF/X-1:2001)
> /G
> TS_PDFXConformance (PDF/X-1a:2001) >> }
> \special: [pdf:put @catalog << /PageMode /UseNone /OutputIntents [ << /Info
> (no
> ne) /Type /OutputIntent /S /GTS_PDFX /OutputConditionIdentifier (Custom)
> /Regis
> tryName (http://www.color.org/) >> ] >> ]\Special {pdf:put @catalog <<
> /PageMod
> e /UseNone /OutputIntents [ << /Info (none) /Type /OutputIntent /S /GTS_PDFX
> /O
> utputConditionIdentifier (Custom) /RegistryName (http://www.color.org/) >> ]
> >>
> } (d:/TeX/Live/2014/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
> \special: [pdf:dest (page.1) [@thispage /XYZ @xpos @ypos null]]\Special
> {pdf:de
> st (page.1) [@thispage /XYZ @xpos @ypos null]}
> \special: [pdf: put @thispage << /ArtBox [0 0 498.89641 708.65968] >>]\Special
> {pdf: put @thispage << /ArtBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /BleedBox [0 0 498.89641 708.65968]
> >>]\Specia
> l {pdf: put @thispage << /BleedBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /CropBox [0 0 498.89641 708.65968]
> >>]\Special
> {pdf: put @thispage << /CropBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /MediaBox [0 0 498.89641 708.65968]
> >>]\Specia
> l {pdf: put @thispage << /MediaBox [0 0 498.89641 708.65968] >>}
> \special: [pdf: put @thispage << /TrimBox [0 0 498.89641 708.65968]
> >>]\Special
> {pdf: put @thispage << /TrimBox [0 0 498.89641 708.65968] >>}
> \special: [pdf:docinfo<</Title(DocTitle)/Subject()/Creator(LaTeX with hyperref
> package)/ModDate(D:20160710163100)/Author()/Producer(XeTeX
> 0.99996)/Keywords()/
> Trapped/False>>]\Special
> {pdf:docinfo<</Title(DocTitle)/Subject()/Creator(LaTeX
> with hyperref package)/ModDate(D:20160710163100)/Author()/Producer(XeTeX
> 0.999
> 96)/Keywords()/Trapped/False>>}
>
> Obviously that will require massaging to rejoin the fractured lines, but it
> will be interesting to see whether it then yields viable Plain XeTeX code. I
> sdhall; report back.
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex