[tex-k] epstopdf: using eps libraries

Reinhard Kotucha reinhard.kotucha at web.de
Mon Nov 19 22:34:32 CET 2012


On 2012-11-19 at 15:26:55 +0900, Norbert Preining wrote:

 > Hi Reinhard,
 > 
 > On Di, 13 Nov 2012, Reinhard Kotucha wrote:
 > > The proper way would be to send only everything between $psstart
 > > and $psstart+$pslen to gs, but these values have to be corrected
 > > because
 > 
 > To cut things short: Does your patch fix a ral problem and does not
 > create new ones?

Hi Norbert,
without the patch, gs crashes when the binary header contains a
linebreak:

   Error: /undefined in be-3.0

(this originates from %!PS-Adobe-3.0 EPSF-3.0).

In order to be sure that I don't break anything, I remove the first 30
bytes from the file only if it begins with the 4-byte magic number
described in Adobe TN5002.  Otherwise the old behavior is retained.

When the binary header is properly stripped, current versions of gs
are able to process the file.  They run into trouble when they
encounter the preview image at the end:

  Error: /undefined in II*

But though gs complains, it creates a valid PDF file.  Thus, my patch
is better than nothing.

 > If yes, why not check it in to the tl svn?

I hesitated in order to allow you to apply your patch first, just
to prevent you from having to resolve conflicts in svn.  Not a big
deal, but always extra work.

Now I'm glad to hear that Heiko looks at it.  BTW, as far as I've
seen, there are no PostScript files beginning with arbitrary binary
junk.  All files with binary headers I've seen comply with TN5002.

The usage has changed.  The original idea was to allow programs to
access a preview image quickly, but nowadays programs like CorelDraw
or InDesign put their source code there.  People believe that these
programs can read PostScript code, but they are cheating.  I have to
revise my expectation that the binary headers are a remnant from the
MS-DOG era and will disappear.  No, they are still ubiquitous today.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the tex-k mailing list