[texworks] error in image display

Bruno Voisin bvoisin at me.com
Sat Feb 27 12:27:54 CET 2010


Le 27 févr. 2010 à 10:45, Benny Lautrup a écrit :

> Thanks for the comments. Neither do I dare to enter into the patching
> business right now.

For the moment a way to circumvent the problem would be to pre-process your PDF files to make sure all fonts are embedded in them already.

A free solution comes through epspdf <http://tex.aanhet.net/epspdf/>. Says section 3.2 of the manual <http://tex.aanhet.net/epspdf/epspdf.pdf>:

"When converting to pdf, Ghostscript handles font embedding differently depending on the “Target use” option. For prepress, it embeds even the standard fonts, including Times etc. Ghostscript has copies of these fonts in case the PostScript file doesn’t have them. For screen, it doesn’t embed standard fonts.
You can embed fonts after the fact by converting pdf to eps or ps, and back to pdf, with target use set to “prepress”. However, don’t try this unless you have pdftops."

You need three things:

- xpdf (only the tools part -- pdftops, pdffonts and the like -- of its distribution is required, not the PDF viewer xpdf itself), for the conversion from PDF to EPS. There are precompiled Win32 binaries of the tools at <http://www.foolabs.com/xpdf/download.html>.

- Ghostscript <http://pages.cs.wisc.edu/~ghost/>, for the conversion from EPS to PDF. I think MikTeX installs it already.

- epspdf, for managing the conversions. I don't remember what was said exactly on it being part of MikTeX or not. It's definitely part of TeX Live.

The epspdf site contains detailed instruction installations and URLs for all of them, for all three platforms (Windows, Linux and Mac).

Here's how things go:

- Your original file. Mathematica1 is embedded but not subset (all characters of the fonts are included, not only the characters used), Times-Roman is not embedded:

$ pdffonts boundary-blasiusstreamlines.pdf 
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
Mathematica1                         Type 1            yes no  no       8  0
Times-Roman                          Type 1            no  no  no       9  0

- The conversion, in two steps: from PDF to EPS, then from EPS back to PDF with "prepress" target:

$ epspdf boundary-blasiusstreamlines.pdf boundary-temp.eps
$ epspdf --target=prepress boundary-temp.eps boundary-prepress.pdf

- The resulting file has both Mathematica1 and Times-Roman embedded and subset, and in addition is smaller:

$ pdffonts boundary-prepress.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
QUYNIS+Mathematica1                  Type 1C           yes yes no       8  0
GCONTZ+Times-Roman                   Type 1C           yes yes no      10  0

This file is included. You may try whether including it in your LaTeX document, instead of the original file, solves the problem with preview using TeXworks r371.

Hope this helps,

Bruno

-------------- next part --------------
A non-text attachment was scrubbed...
Name: boundary-prepress.pdf
Type: application/pdf
Size: 161449 bytes
Desc: not available
URL: <http://tug.org/pipermail/texworks/attachments/20100227/6b59b80b/attachment-0001.pdf>


More information about the texworks mailing list