[XeTeX] Merging PDF Documents with Ghostscript

Bruno Voisin bvoisin at me.com
Mon Sep 22 15:22:48 CEST 2008


Le 22 sept. 08 à 14:58, Thomas Bohn a écrit :

> I tried to merge two with XeTeX created PDF files with Ghostscript,
> this was the result:
>
> [...]
>
> Fonts are embedded in the PDF file. It is MacTeX 2008.

Another way of merging two PDF files is to use the pdfpages LaTeX  
package. Just create, in the same directory as your PDF files, a file  
with content like

\documentclass[a4paper]{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages=-]{pdffile1}
\includepdf[pages=-]{pdffile2}
\end{document}

(customizing the paper size to your setup) and typeset this file with  
XeLaTeX.

The texexec command-line utility may also be your friend. From the  
ConTeXt wiki:

Combine two or more PDF files into one file
texexec --pdfcombine --nobanner --result=result.pdf 1.pdf 2.pdf

Concatenate two or more PDF files into one file
texexec --pdfcopy --result=result.pdf 1.pdf 2.pdf

AFAIK (no being a ConTeXt user myself), texexec was created for  
running ConTeXt but may also be used on its own right for other  
purposes.

If none of the above works, there's probably something wrong in your  
PDF files, either because of XeTeX or because of the TeX Gyre Termes  
font used inside.

Bruno Voisin


More information about the XeTeX mailing list