Reputation: 1
On a linux based ftp server I need to provide previews of image data as well as print quality PDF documents in a browser based interface. The server software I use (crushFTP) recommends the usage of Imagemagick to create such previews and provides respective presets for the command line. By using the convert command it creates jpgs in different sizes and saves them in a separate folder (/previews) with subfolders named after the original file. The original file itself is left unchanged. For image data of all sorts this works just fine, as for PDF files (and in that sense Adobe Illustrator files, too) I encounter certain problems. Going by the crushFTP log the Ghostscript delegate that Imagemagick uses is not able to find the fonts used in the PDFs. After having tried out a couple of things I understood that in the respective PDFs the fonts are not fully embedded but are subset. Since the PDF files are provided from third parties, fully embedding the fonts is not an option. Nevertheless, PDFs with fully embedded fonts are converted and the previews look fine. Including the fonts in Ghostscript's fontmap can only be a temporary workaround (since the fonts are available - legally - but once a new font will be used by the PDF file provider Ghostscript again won't be able to decode the files). Therefore my question is: is there a way to convert PDF files with subset fonts via Imagemagick and/or Ghostscript without having to include the fonts in the fontmap for Ghostscript? If so, how can this be done? If there is no way to do so, can you recommend an alternative way to create such previews?
Upvotes: 0
Views: 892
Reputation: 31207
The fact that the fonts are subset is irrelevant. Either the fonts are embedded in the PDF file or they are not. If the fonts are embedded, then it doesn't matter if they are subset, Ghostscript will use those fonts to render the PDF.
If the fonts are not present then a number of different fallback strategies take place, exactly which depends on the nature of the font (TrueType, type 1, CIDFont etc) and the way that GS has been set up.
You haven't said what the actual problem you are experiencing is, just 'certain problems' which isn't very illuminating.
Can you supply an example PDF file to look at ? Which version of Ghostscript are you using ? Do you get any errors or warnings from Ghostscript, if so what are they ? Do you know the Ghostscript command line that ImageMagick is sending ?
Upvotes: 3