Re: Something wrong with this PDF to PS conversion
Chris Liddell <[email protected]> Thu, 29 Sep 2016 22:04:28 +0100
| Newsgroups | gmane.comp.printing.ghostscript.devel |
|---|---|
| Message-ID | <CAGy8pWrH-J=_fJXHbokxvCbaouFQGXcQEhYfqhCUWjc4EqAW9Q@mail.gmail.com> |
On 29 September 2016 at 16:14, Alex Korobkin <[email protected]> wrote: > You guys are pro at deciphering PostScript, I was hoping you can help me > with this problem below. I don't know where else to ask. > > Here is a seemingly valid roboto.pdf with a single line of text and one > special character, å. When this PDF is passed through cgpdftops (Apple's PS > filter), it comes out invalid. > > GhostScript would say: > GPL Ghostscript 9.05: Error: Font Renderer Plugin ( FreeType ) return code = > -10 > Can't render Font RGEZEM+Roboto-Regular with FAPI, will do with native GS > renderer. > Can't render Font F1.1 ( aliased from RGEZEM+Roboto-Regular ) with FAPI, > will do with native GS renderer. > > ERROR: rangecheck > Offending command: show > > Stack: (!) > > What's wrong with the way this PS conversion was done? > Could the original PDF be encoded in a different way to avoid this? There's a broken Truetype font in the Postscript - it lacks a cmap table which is a mandatory table in Truetype. It also looks like some offsets or table lengths are wrong. The way to avoid this problem would be to use a non-broken TTF...... I doubt whether it is feasible to make the Postscript interpreter any more tolerant of such problems. Chris