1

How can I get ghostscript v9.0 running on a windows 7 server to recognize a local font as the one it has embedded? I'm trying to convert a pdf with an embedded AkzidenzGroteskBE font and want it to use a AkzidGroCFFReg.otf open type font when rendering.

When I run it with -dFAPIDEBUG it says:

FAPIhook DRWIBO+AkzidenzGroteskBE-LightCN
Trying to render the Font DRWIBO_AkzidenzGroteskBE-LightCn with FAPI...
Font DRWIBO+AkzidenzGroteskBE-LightCn is being rendered with FAPI=FreeType
FAPIhook --nostringval--
Font --nostringval -- (aliased from DRWIBO+AkzidenzGroteskBE-LightCn) is mapped to FAPI=FreeType

The command I'm using to run it is:

gs9.00\bin\gswin32.exe -dFAPIDEBUG -Ic:\TEMP\font -SDEVICE=pngalpha -r300 -sOuputFile=test.png inputFile.pdf

I have AkzidGroCFFReg.otf as well as the rest of the family of fonts in the c:\TEMP\font directory (they are also installed on the system).

Thanks.

1 Answer 1

0

If a font is embedded in the PDF itself, then all PDF renderers are supposed to use that one, not any locally installed font.

If you want to replace the embedded font, you'll not get that for free (as in beer) or in an easily achieved way.

There is (rather expensive) payware that is able to un-embed embedded fonts from a PDF. (At least there is no (reliably working) Free (as in liberty) software that can do it...

One (rather tedious, error-prone and difficult difficult) method would be to convert the PDF to PostScript, open the .ps file in an editor, remove the font(s), save the file and re-convert the .ps to a PDF again (using an Ghostscript commandline). Or directly from .ps to the PNG you want without the detour via PDF... But this method requires you to know quite a bit about the PostScript language.

1
  • I would suggest that this really only requires a passing familiarity with the structure of postscript documents, rather than "quite a bit about postscript". That is, I think it is generally easy to remove resources from a postscript document if the postscript generator follows the document structuring conventions, because the comments make it easy to identify the embedded resources.
    – larsks
    Jul 2, 2011 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .