This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] EPS, SVG, fonts, PDF, and embedding (was "how to print a pdf?")


[subject line changed to facilitate easy searching of the archives]

> I created a PDF file with xsltproc.  Most images that it contains 
> are EPS. AcroRead does not know how to display them.  According 
> to the FAQ it nevertheless should be possible to print them on 
> a postscript aware printer.

Below is a note containing relevant information that I made to myself 
and now have included as comments in my XSL customization layer. The 
objective is to use vector graphics and embed the fonts they contain 
in a final PDF. Here's some information on how I am doing that.
 
***********
As of fop-0.20.5, fop cannot produce correct PDF output if the 
document uses eps graphics. The eps graphics are not rendered to PDF. 
Instead, the PDF output includes blank placeholders where the eps 
graphics should be. However, fop can correctly produce PostScript 
output that includes eps graphics. The PostScript file can then be 
converted to PDF using ps2pdf or Adobe Acrobat Distiller. 
Unfortunately, fop-0.20.5 does not embed fonts in PostScript output, 
not even PostScript fonts. The result is that an author is free to 
use eps graphics, or embed fonts, but not both. The solution is to 
use SVG graphics, embed the SVG graphics, and produce PDF with fop 
using the -pdf option. Caveats with this approach: 1) if the 
graphic's fonts are embedded in the SVG image, fop cannot convert the 
SVG graphic to PDF. So, don't embed the  graphic's font in the SVG 
image file, but rather add the embedded font to the fop configuration 
file. 2) when acrobat displays the PDF file, fonts in the embedded 
SVG graphic won't look very good unless "smooth line art" is chosen 
from edit > preferences > general (writes .acrorc ?). I know of no 
similar setting in the In the xpdf config file (xpdfrc or .xpdfrc). 
3) The fonts in the SVG graphics will be completely mangled if the 
text runs vertically in the SVG (FOP bug? Help!!). GV (ghostview) 
seems to not have the problems with fonts in SVG graphics. 

To avoid FOP rasterizing the PostScript fonts, you must set the FOP 
config file entry for the key strokeSVGText to false: 

<entry>
  <key>strokeSVGText</key>
  <value>false</value>
</entry>

That forces fop to use vectors for the fonts instead of rasterizing 
them. You want this. I am surprised it is not a default already. 
Rasterized fonts almost always look bad.
***********************************

If any of the above information is wrong, would one of this lists's 
experts please correct it? Also, I expect this is a FAQ, or will be.

Steve Whitlatch



To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]