[XeTeX] Xetex PDF title
Bruno Voisin
bvoisin at mac.com
Mon Apr 2 09:55:34 CEST 2007
Le 2 avr. 07 à 08:41, Hans van Maanen a écrit :
> This is strange: I have a proper pdf file, made with Xetex, named
> Lloyd.pdf. I published it on the web, but today I searched for it
> with Google, and it has the title:
>
> [PDF] XeTeX output 2006.07.02:1429
>
> which, indeed, turns out to be a string buried a few times deep
> inside the document. How can I prevent this from happening? I seemto
> remember that Print > Compress PDF will strip this info from the
> file, but that seems a bit roundabout.
I'm not quite sure that XeTeX includes an interface for defining the
metadata of the PDF files that it produces.
Two ideas:
- The hyperref package has commands for setting these metadata. You
may try to use it, and see whether that works. Normally in TeXLive I
think XeTeX sets automatically the option [dvipdfm] for this package
when it is running; if your installation is older and doesn't include
this feature, you may try to specify the option manually. Beware
though: hyperref has a habit of interfering with other packages (it
redefines a number of LaTeX internals), and is likely to modify
spacing and page breaks slightly.
- With xdvipdfmx as the XDVI-to-PDF driver, the above should work.
With xdv2pdf as the driver (xdv2pdf being the default on the Mac), it
may not work. If that's the case, you may try the manipulation that
is mentioned in the XeTe-notes documentation (I'm not sure the
information in this doc is still current, things may have improved
since it was last updated):
> \subsubsection{Hyperlinks and outlines}
>
> While \XeTeX\ does not support the PDF-specific extensions of pdf
> \TeX, some PDF features can be accessed via |\special|s similar to
> those used by the |dvipdfm| driver. When it generates a PDF file, |
> xdv2pdf| writes an auxiliary file with the extension |.marks| that
> contains a record of all |\special| commands that begin with the
> text |pdf:|. Each such |\special| is written with information on
> its exact location (page number and ({\em x, y}) coordinates). A
> Perl script |xdv2pdf_mergemarks| is then automatically executed,
> and has the opportunity to integrate information from the marks
> file into the main PDF document.
>
> The |xdv2pdf_mergemarks| script attempts to handle the |\special|s
> used by the |dvipdfm| driver to implement document outlines
> (bookmarks) and some kinds of hyperlinks, to support the \LaTeX\ |
> hyperref| package with the |dvipdfm| output option. The |.marks|
> file is deleted after processing; to retain it for inspection or
> further processing, modify the script to remove the |unlink| command.
And finally, it's also possible that the metadata are hardcoded
inside XeTeX and can't be changed for now. However, in my experience
Jonathan Kew is very open to suggestions. Originally XeTeX included
not only the metadata you report in its output, but also the author,
institution etc. taken (I think) from the info you give when
installing OS X. This was annoying when you are writing a review (of
a proposal, paper, communication...), supposed to be anonymous and
more-and-more often sent as a PDF file to the editor in charge and
then forwarded to the author of the proposal, paper, communication by
this editor. I reported this concern to Jonathan, and he removed the
corresponding code from XeTeX overnight!
Bruno Voisin
More information about the XeTeX
mailing list