[XeTeX] PDF file info

Jonathan Kew jonathan_kew at sil.org
Sat Apr 14 22:54:46 CEST 2007


On 14 Apr 2007, at 7:54 pm, baptiste Auguié wrote:

> Hi,
>
> With pdflatex, I used to add some information in the resulting pdf  
> file using either of these,
>
>>
>> \ifxetex
>> \hypersetup{ %
>>     pdfauthor   = {baptiste},%
>>     pdftitle    = {my title},%
>>     pdfsubject  = {stuff},%
>>     pdfkeywords = {more stuff},%
>>     pdfcreator  = {XeTeX},%
>>     pdfproducer = {XeTeX},%
>>     }
>> \else
>>
>> \pdfinfo { /Title  (PhD Thesis)
>>                /Creator (TeX)
>>                /Producer (pdfTeX)
>>                /Author (Baptiste)
>>                /CreationDate (D:20061022000000)  %format  
>> D:YYYYMMDDhhmmss
>>                /ModDate (D:20061022000000)
>>                /Subject (SPs )
>>                /Keywords (PhD, Thesis)}
>> \pdfcatalog { /PageMode (/UseOutlines)
>>                   /OpenAction (fitbh)  }
>> \fi
>
> the first option (together with the hyperref package) doesn't do  
> anything in xetex as far as i can tell, and the second produces an  
> error so I suppose it's not compatible with xetex.
>
> Is there any way to add these info in XeTeX?

\pdfinfo and \pdfcatalog are (presumably) pdftex-specific commands,  
and won't work with xetex.

It's possible that the hyperref approach could work, with the correct  
combination of hyperref options and output driver. If you're on a  
Mac, try using xdvipdfmx instead of the default xdv2pdf; it might  
support these features. (To do this, run xelatex with the option - 
output-driver="xdvipdfmx -q -E".)

> And just for information, is there an easy way to password protect  
> the pdf file with XeTeX?

Not unless the xdvipdfmx output driver supports this (which I'm not  
aware of). I think you'd need to post-process the PDF in some way.

JK



More information about the XeTeX mailing list