A common problem for book authors is the delivering of their book in acceptable form as digital file. While Latex is doing a great job, a few tricks have to be known to prepare the book file correctly. Nowadays book editors seem to prefer high quality PDF files instead of Postscript files. This document describes how to arrive at an acceptable PDF file by using Open Source/Free Software tools. Important to know is that prepress machines seem not to provide any font! So all fonts need to be embedded.
This page reflects our experiences with a major publisher; finally, after trying various ways, we found a simple solution which we explain below.
Fonts
#prepare the DVI file: latex mybook.tex bibtex mybook.tex latex mybook.tex #render the high resolution PDF from the DVI file: export MYBOOKDVI=mybook.dvi export MYBOOKPDF=mybook_highres.pdf #MANDRAKE 9.1: DVIPS=dvips -j0 -Ppdf -Pdownload35 -G0 -t letter -D 1200 -Z -mode ljfzzz #REDHAT 9 (ar-std-urw-kb.map,ar-ext-urw-kb.map : assume K Berry names - Kluwer however uses 'Dvipsone' names): # Note: there is a bug in the font mapping on Redhat9 (mtsupp-std-urw-urw.map contains Nimbus...): # however, it works fine on Mandrake. #DVIPS=dvips -j0 -Ppdf -u ps2pk.map -G0 -t letter -D 1200 -Z -mode ljfzzz #SuSe: # ... seems to be similar to Redhat9 ... #Notes: # -j0 -G0: tells dvips to embed the fonts 100% # -Pdownload35 or -u ps2pk.map: configuration of PostScript Type 1 fonts # - Dvipsone Names: they have to be activated in the style file of the publisher ${DVIPS} ${MYBOOKDVI} -o - | gs -q -dNOPAUSE -dBATCH \ -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress\ -dCompatibilityLevel=1.3 \ -dCompressPages=true -dUseFlateCompression=false \ -sPAPERSIZE=letter \ -dSubsetFonts=true -dEmbedAllFonts=true \ -dProcessColorModel=/DeviceGray \ -dDetectBlends=true -dOptimize=true \ -dDownsampleColorImages=true -dColorImageResolution=1200 \ -dColorImageDownsampleType=/Average -dColorImageFilter=/FlateEncode \ -dAutoFilterColorImages=false -dAntiAliasColorImages=false \ -dColorImageDownsampleThreshold=1.50000 \ -dDownsampleGrayImages=true -dGrayImageResolution=1200 \ -dGrayImageDownsampleType=/Average -dGrayImageFilter=/FlateEncode \ -dAutoFilterGrayImages=false -dAntiAliasGrayImages=false \ -dGrayImageDownsampleThreshold=1.50000 \ -dDownsampleMonoImages=true -dMonoImageResolution=1200 \ -dMonoImageDownsampleType=/Average -dMonoImageFilter=/FlateEncode \ -dAutoFilterMonoImages=false -dAntiAliasMonoImages=false \ -dMonoImageDownsampleThreshold=1.50000 \ -sOutputFile=${MYBOOKPDF} \ -c save pop - #now you should find the PDF in the local directory.
The publisher's PDF preflight should now run well.
dvips: Font Helvetica used in file figures/gstat_ln_zinc1.eps is not in the mapping file. dvips: Font Helvetica-Bold used in file figures/R_ecdf_elev_int.eps is not in the mapping file. dvips: Font Helvetica-Oblique used in file figures/R_ecdf_elev_int.eps is not in the mapping file. dvips: Font Helvetica-BoldOblique used in file figures/R_ecdf_elev_int.eps is not in the mapping file. dvips: Font Symbol used in file figures/R_ecdf_elev_int.eps is not in the mapping file.
%%[ Warning: Helvetica not found, using Font Substitution. Font cannot be embedded.]%%
This problem can be solved by changing the fonts in the EPS file(s). The problem arises from the fact that standard PostScript fonts are not embedded, but for prepress stage we need all fonts embedded.
Solution: You can happily edit EPS files with a text editor (nedit, gedit, ...) and replace the font names according to this table:
Name Translation table: GhostScript fonts | PostScript name | URW Name (use for embedding) --------------------------------------+-------------------+----------------------------- Nimbus Sans L Regular Helvetica NimbusSanL-Regu Nimbus Sans L Regular Italic Helvetica NimbusSanL-ReguItal Nimbus Sans L Bold Helvetica NimbusSanL-Bold Nimbus Sans L Bold Italic Helvetica NimbusSanL-BoldItal Nimbus Sans L Regular Condensed Helvetica Narrow NimbusSanL-ReguCond Nimbus Sans L Regular Condensed Italic Helvetica Narrow NimbusSanL-ReguCondItal Nimbus Sans L Bold Condensed Helvetica Narrow NimbusSanL-BoldCond Nimbus Sans L Bold Condensed Italic Helvetica Narrow NimbusSanL-BoldCondItal Nimbus Roman No9 L Regular Times NimbusRomNo9L-Regu Nimbus Roman No9 L Regular Italic Times NimbusRomNo9L-ReguItal Nimbus Roman No9 L Medium Times NimbusRomNo9L-Medi Nimbus Roman No9 L Medium Italic Times NimbusRomNo9L-MediItal Standard Symbols L Symbol StandardSymL [...] --------------------------------------+-------------------+-----------------------------Note: See at page bottom for a more complete table.
Example: After changing 'Helvetica' to 'NimbusSanL-Regu' in the EPS file, this font will be embedded into the final PDF file.
Since we are lazy, we let the computer do this change-the-names job:
# We go for replacing the wrong commercial font names with URW names, we also # adapt some similar fonts names on the fly (extend for further font names): cat original_graphics.eps | sed 's+Times-Bold+NimbusSanL-Bold+g' |\ sed 's+Times-Roman+NimbusSanL-Regu+g' |\ sed 's+Times+NimbusSanL-Regu+g' |\ sed 's+Helvetica-BoldOblique+NimbusSanL-BoldItal+g' |\ sed 's+Helvetica-Oblique+NimbusSanL-ReguItal+g' |\ sed 's+Helvetica-Bold+NimbusSanL-Bold+g' |\ sed 's+Helvetica-Bold-iso+NimbusSanL-Bold+g' |\ sed 's+Helvetica+NimbusSanL-Regu+g' |\ sed 's+Helvetica-iso+NimbusSanL-Regu+g' |\ sed 's+Symbol+StandardSymL+g' > new_graphics.eps
However, the EPS file from OpenOffice was still different from the one from StarOffice, so StarOffice might be preferred to create EPS. StarOffice does not have the Text settings option and always includes the font definition. When keeping fonts e.g. Times-Bold the resulting EPS file must be run through above 'sed' script to change to Nimbus.
The only functional program is ps2eps from Roland Bless. All other programs are rubbish. For e.g. Linux, you may get it through the "texlive-pstools-bin" and "texlive-pstools" RPM packages.
# convert to Postscript pdftops main.pdf main.ps # reconvert to PDF but enforce font embedding (note, hyperlinks will not survive) ps2pdf14 -dPDFSETTINGS=/prepress -dEmbedAllFonts=true main.ps main2.pdf # verify pdffonts main2.pdf
Font name (sorted) | Alternative name | Font name | Alternative name (sorted) | |
AvantGarde-Book | URWGothicL-Book | Helvetica-BoldItalic | Arial-BoldItalic | |
AvantGarde-BookOblique | URWGothicL-BookObli | Helvetica-Italic | Arial-Italic | |
AvantGarde-Demi | URWGothicL-Demi | NewCenturySchlbk-Bold | CenturySchL-Bold | |
AvantGarde-DemiOblique | URWGothicL-DemiObli | NewCenturySchlbk-BoldItalic | CenturySchL-BoldItal | |
Bookman-Demi | URWBookmanL-DemiBold | NewCenturySchlbk-Italic | CenturySchL-Ital | |
Bookman-DemiItalic | URWBookmanL-DemiBoldItal | NewCenturySchlbk-Roman | CenturySchL-Roma | |
Bookman-Light | URWBookmanL-Ligh | Courier-BoldItalic | CourierNew-BoldItalic | |
Bookman-LightItalic | URWBookmanL-LighItal | Courier-Italic | CourierNew-Italic | |
Courier | NimbusMonL-Regu | ZapfDingbats | Dingbats | |
Courier-Bold | NimbusMonL-Bold | Courier-Bold | NimbusMonL-Bold | |
Courier-BoldItalic | CourierNew-BoldItalic | Courier-BoldOblique | NimbusMonL-BoldObli | |
Courier-BoldOblique | NimbusMonL-BoldObli | Courier | NimbusMonL-Regu | |
Courier-Italic | CourierNew-Italic | Courier-Oblique | NimbusMonL-ReguObli | |
Courier-Oblique | NimbusMonL-ReguObli | Times-Bold | NimbusRomNo9L-Medi | |
Helvetica | NimbusSanL-Regu | Times-BoldItalic | NimbusRomNo9L-MediItal | |
Helvetica-Bold | NimbusSanL-Bold | Times-Roman | NimbusRomNo9L-Regu | |
Helvetica-BoldItalic | Arial-BoldItalic | Times-Italic | NimbusRomNo9L-ReguItal | |
Helvetica-BoldOblique | NimbusSanL-BoldItal | Helvetica-Bold | NimbusSanL-Bold | |
Helvetica-Italic | Arial-Italic | Helvetica-Narrow-Bold | NimbusSanL-BoldCond | |
Helvetica-Narrow | NimbusSanL-ReguCond | HelveticaNarrow-Bold | NimbusSanL-BoldCond | |
Helvetica-Narrow-Bold | NimbusSanL-BoldCond | Helvetica-Narrow-BoldOblique | NimbusSanL-BoldCondItal | |
Helvetica-Narrow-BoldOblique | NimbusSanL-BoldCondItal | HelveticaNarrow-BoldOblique | NimbusSanL-BoldCondItal | |
Helvetica-Narrow-Oblique | NimbusSanL-ReguCondItal | Helvetica-BoldOblique | NimbusSanL-BoldItal | |
Helvetica-Oblique | NimbusSanL-ReguItal | Helvetica | NimbusSanL-Regu | |
HelveticaNarrow | NimbusSanL-ReguCond | Helvetica-Narrow | NimbusSanL-ReguCond | |
HelveticaNarrow-Bold | NimbusSanL-BoldCond | HelveticaNarrow | NimbusSanL-ReguCond | |
HelveticaNarrow-BoldOblique | NimbusSanL-BoldCondItal | Helvetica-Narrow-Oblique | NimbusSanL-ReguCondItal | |
HelveticaNarrow-Oblique | NimbusSanL-ReguCondItal | HelveticaNarrow-Oblique | NimbusSanL-ReguCondItal | |
NewCenturySchlbk-Bold | CenturySchL-Bold | Helvetica-Oblique | NimbusSanL-ReguItal | |
NewCenturySchlbk-BoldItalic | CenturySchL-BoldItal | Symbol | StandardSymL | |
NewCenturySchlbk-Italic | CenturySchL-Ital | Bookman-Demi | URWBookmanL-DemiBold | |
NewCenturySchlbk-Roman | CenturySchL-Roma | Bookman-DemiItalic | URWBookmanL-DemiBoldItal | |
Palatino-Bold | URWPalladioL-Bold | Bookman-Light | URWBookmanL-Ligh | |
Palatino-BoldItalic | URWPalladioL-BoldItal | Bookman-LightItalic | URWBookmanL-LighItal | |
Palatino-Italic | URWPalladioL-Ital | ZapfChancery-MediumItalic | URWChanceryL-MediItal | |
Palatino-Roman | URWPalladioL-Roma | AvantGarde-Book | URWGothicL-Book | |
Symbol | StandardSymL | AvantGarde-BookOblique | URWGothicL-BookObli | |
Times-Bold | NimbusRomNo9L-Medi | AvantGarde-Demi | URWGothicL-Demi | |
Times-BoldItalic | NimbusRomNo9L-MediItal | AvantGarde-DemiOblique | URWGothicL-DemiObli | |
Times-Italic | NimbusRomNo9L-ReguItal | Palatino-Bold | URWPalladioL-Bold | |
Times-Roman | NimbusRomNo9L-Regu | Palatino-BoldItalic | URWPalladioL-BoldItal | |
ZapfChancery-MediumItalic | URWChanceryL-MediItal | Palatino-Italic | URWPalladioL-Ital | |
ZapfDingbats | Dingbats | Palatino-Roman | URWPalladioL-Roma | |