Saturday, October 06, 2007

Producing Reliable PDF Documents

Producing Reliable PDF Documents
These guidelines are designed to help you make sure that you can produce reliable PDF documents, so that the paper you submit to ISMIR 2005 will print correctly for the reviewers and in the ISMIR 2005 proceedings.

Disclaimer: We believe these guidelines are correct according to the latest versions of the various tools, but if in doubt please consult the documentation for the PDF (and PostScript) tools you are using.

Contents of this page:

Introduction
Producing PDF from LaTeX
Producing PDF from Word
Converting PostScript to PDF
Testing your PDF output
Further Information
Introduction
Most of the time, PDF documents (sometimes know as "Adobe Acrobat" documents) are a very convenint way to distribute documents. However, sometimes the way that PDF documents use fonts can lead to problems.

In particular, if fonts are not "embedded" (included in the document itself) then it may not print correctly. This will be particularly true when the proceedings are printed, since print shop printers typically contain only the basic fonts required.

To make sure that your PDF submission will print as you intend, you must

Use "Type 1" Fonts (not "Type 3" fonts)
"Embed" and "subset" all fonts when producing the PDF
If you do not, you may get one or more of the following problems when your paper is viewed by the reviewers, or printed in the proceedings:

Occasional characters may be wrong (e.g. "£" instead of "fi")
Some characters may be missing (e.g. mathmatical symbols)
The paper will show "blocky" low quality characters when displayed on the screen or printed.
Some fonts (e.g. "Times-Roman", "Courier") are expected to be available on all PDF devices and are not normally embedded. These are called the "Base 14" fonts. However, for maximum portability you should also embed and subset even these fonts.

Producing reliable PDF files from LaTeX
Use the following template to prepare your paper:

LaTeX Template Package (ZIP file)
You can produce your PDF document through one of 2 main routes:

Traditional LaTeX route: to dvi, dvi to PostScript, PostScript to PDF
pdfLaTeX route: direct to PDF
1. Traditional LaTeX route
This more "traditional" route involves 3 steps. For most Unix systems, with your LaTeX file called "mypaper.tex", use the following commands:


--------------------------------------------------------------------------------

latex mypaper

dvips -Ppdf -G0 -ta4 mypaper

ps2pdf -dPDFSETTINGS=/printer
-dCompatibilityLevel=1.3 -dMaxSubsetPct=100
-dSubsetFonts=true -dEmbedAllFonts=true
-sPAPERSIZE=a4 mypaper.ps


--------------------------------------------------------------------------------

NB: The "ps2pdf" command above should be typed all on one line.

Alternatively, the last step (converting from PostScript to PDF) can be performed using GSview or Adobe Distiller, with the correct options. For more information see Converting PostScript to PDF below.

Once completed, Test your PDF document to make sure the fonts are embedded correctly.

2. pdfLaTeX route
pdfLaTeX (pdfTeX) can directly create PDF files from TeX source. However, this will require that you have all graphics/images of your document available in PDF format.

This route should produce reliable PDF using Type 1 Fonts.

However, by default pdfLaTeX it will not embed and subset the Base 14 fonts by default. For maximum reliability we recommend that you set your pdfTeX configuration to do this.

Michael Shell's testflow documentation recommends the following configuration settings, to make sure Type 1 fonts will be used and the base 14 fonts will be embedded:


--------------------------------------------------------------------------------

pdfTeX's pdftex.cfg configuration file is much like dvips' as fonts are concerned. It is important that the following lines be present and uncommented:

map +bsr.map % CM/AMS fonts
map +bsr-interpolated.map % additional sizes
map +hoekwater.map % additional fonts from Taco Hoekwater

so that the BlueSky Type 1 Computer Modern fonts will be used.

Note: The pdftex.cfg file on some systems (MiKTeX) may not have these lines, but instead uses a "map psfonts.map" line which basically does the same thing as the three above.)

pdfTeX can also be configured to embed the base 14 fonts (Nimbus) by replacing the line (usually the first of the map lines to appear in pdftex.cfg):

map acrobat-std-adobe-buildin.map

with:

map acrobat-std-urw-kb.map

This basically tells pdfTeX to use and embed the Nimbus fonts instead of relying on the (substituted) fonts that are built into Acrobat Reader.


--------------------------------------------------------------------------------

For more information, see testflow_doc.txt in the testflow diagnostic suite.

Once completed, Test you PDF document to make sure the fonts are embedded correctly.

Producing reliable PDF from Microsoft Word
Use the following template to prepare your paper:

Word Template Package (ZIPfile)
To produce the PDF document, you can either:

Print directly to an Adobe PDF file using Acrobat Distiller (Windows) or Create Adobe PDF (Mac) printer driver; or
Print to a PostScript file, then convert to PDF
Note that the old "PDFWriter" printer driver is not recommended.

Printing Directly to Adobe PDF
To print directly to PDF requires a full installation of Adobe Acrobat to be installed.

To embed the Base 14 fonts, use e.g. the "Press Quality" (pre-press) or "High Quality" (printer) conversion setting is used. For more details, see your Adobe Acrobat documentation.

Once completed, Test you PDF document to make sure the fonts are embedded correctly.

Printing to PostScript and converting to PDF
To print to PostScript, use a PostScript printer driver, e.g. the Adobe PostScript printer driver or a PostScript printer driver from Hewlett Packard.

Once you have your PostScript document, follow the instructions below to Convert PostScript to PDF.

Convering PostScript to PDF
To convert a PostScript document to PDF, you can use e.g.:

Adobe Acrobat Distiller; or
Use ps2pdf from the command line
Use the GSview graphical user interface, selecting the pdfwriter device
Converting PostScript to PDF using Adobe Acrobat Distiller
To embed the Base 14 fonts, use e.g. the "Press Quality" (pre-press) or "High Quality" (printer) conversion setting. For more details, see your Adobe Acrobat documentation.

Once completed, Test your PDF document to make sure the fonts are embedded correctly.

Converting PostScript to PDF using using ps2pdf
To use ps2pdf from the command line, type the following options:

ps2pdf -dPDFSETTINGS=/printer
-dCompatibilityLevel=1.3 -dMaxSubsetPct=100
-dSubsetFonts=true -dEmbedAllFonts=true
-sPAPERSIZE=a4 mypaper.ps

(This command should be typed all on one line).

Once completed, Test your PDF document to make sure the fonts are embedded correctly.

Converting PostScript to PDF using using GSview
Open the PostScript document in GSview.
Choose "Media" and select "A4"
Choose "File / Convert ...".
In the "Convert" dialog, select the device "pdfwrite" (resolution "600" is OK)
Select "Properties" and set the following properties:
PDFSETTINGS
/printer (or /prepress)
CompatibilityLevel 1.3
EmbedAllFonts true
SubsetFonts true
MaxSubsetPct 100

Still in the "Convert" dialog, click "OK", and save the PDF file you want.
Once completed, Test your PDF document to make sure the fonts are embedded correctly.

Testing your PDF document
To check your PDF files, you can use either pdffonts (part of Xpdf) or Adobe Acrobat.

Testing PDF files with pdffonts
Use the command: pdffonts mypaper.pdf

This will list the fonts included in your document. Check the following:

All fonts have "Type 1", "Type 1C" or "TrueType" in the "type" column
All fonts have "yes" in the "emb" (embedded) column
All fonts have "yes" in the "sub" (subsetted) column
(Don't worry if the names look a bit strange: this is done to make the embedded fonts unique)

Testing PDF files with Adobe Acrobat
Open the PDF document with Adobe Acrobat, select "File" / "Document Properties ..." and select the "Fonts" item. This will list all the fonts in the document. Check the following:

All fonts are listed as "(Embedded Subset)"
All fonts are of type "Type 1", "Type 1C" or "TrueType"
What to do if any Type 3 fonts are shown
You have probably generated you PDF via dvips without the "-Ppdf" option. See Producing reliable PDF files from LaTeX above.

It is also possible that Type 3 fonts were included in figures included in your document. If you think you have used dvips correctly (or created your document in Word) try again without your figures to see if this is the problem.

What to do if any fonts are not embedded
If the Base 14 fonts are not listed as "(Embedded Subset)" your paper will probably print OK on most devices. The Base 14 fonts are:

Times (regular, bold, italic, bold italic)
Helvetica [Arial] (regular, bold, italic, bold italic)
Courier (regular, bold, italic, bold italic)
Symbol
Zapf Dingbats
If any other fonts are not embedded, your document will look to you when viewed on your machine (or others with the same fonts installed), but it is not guaranteed to print correctly on other machines. To check this, turn on 'Use Local Fonts' in Adobe Acrobat, as follows:

Acrobat 5 - "View" menu and ensure the 'Local Fonts' option is not ticked
Acrobat 6 - "Advanced" menu and ensure the 'Local Fonts' option is not ticked
If some symbols or characters disappear (in particular check any mathematical symbols or other special characters), you are not embedding some non-Base 14 fonts, and your paper will not print correctly.

To make sure that your paper will print correctly on any device, we strongly recommend you embed even the Base 14 fonts. Adobe Distiller will embed the Base 14 fonts if e.g. the "Press Quality" (pre-press) or "High Quality" (printer) conversion setting is used. The pdfwriter device in ps2pdf / Ghostscript will embed the Base 14 fonts if e.g. the PDFSETTINGS=/printer setting is used.

Further Information
If you are stuck, try one of the following resources (but remember, ISMIR 2005 uses "A4" paper size, not US "letter" paper size that some other conferences use):

Information for Manuscript Preparation from the International Conference on Rehabilitation Robotics (IEEE)
These are particularly well explained, showing menu settings for graphical user interfaces.
NB: Remember ISMIR 2005 uses "a4" papersize, not "letter" as described in these instructions.
Creating Fastlane PDF files (NSF)
NB: Remember ISMIR 2005 uses "a4" papersize, not "letter" as described in these instructions.
testflow diagnostic suite to test LaTeX print flow. In particular, the file testflow_doc.txt contains very extensive information about PDF font issues.
Adobe Support Knowledgebase: Font handling in Acrobat Distiller

No comments: