I have a lot of Chinese files produced InDesign. Each file is around 500 KB and displays correctly with gs. When I use a command like "gs -q -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=x.ps 8240.eps", gs reduces the file to 10 KB, but when I view the resulting file with gs, some lines are missing. This might be another symptom of bug 689525. If I zoom into the file with gv, the missing lines appear, but the fonts have been rasterized. Using -r with large values improves the appearance, but at the expense of making the file much larger. Is there a way to stop gs from rasterizing the fonts? I am working on Linux on a Pentium using gs 8.61. Is there any way to reduce the size of this file? I need to build a page with about 200 of these files, and the page is getting very large. pdfwrite produces a 15 KB pdf, but xpdf's pdftops creates a 1500 KB ps (larger than the original ps) and gs's pdf2ps produces a ps with the same problem as pswrite.
Created attachment 3588 [details] sample eps file This is a sample file with Chinese characters that shows the problem. The file looks OK, but if you process it with "gs -q -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=x.ps 8240.eps" and view the result with gv, some letters are missing parts at low zoom levels and the letters appear rasterized at high zoom levels.
Created attachment 3589 [details] screen capture of generated and original file This screen capture shows the file generated by "gs -q -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=x.ps 8240.eps" on the left and the original file on the right. I circled one of the characters in the main window that is missing lines. When I zoom 64X, the lines are there, but the character has been rasterized.
pswrite can't support CIDFont fonts so everything gets mapped to a bitmap font. The quality can be improved somewhat by setting a higher resolution for pswrite, but that makes the file even larger. In theory ps2write _could_ convert to CIDFonts (as pdfwrite does), but this is an enhancement. Currently ps2write also maps to bitmapped fonts.
Enhancement still missing in Ghostscript 9.03
We want to update ps2write so that it can handle CIDFonts (optionally) and as a starter in the direction of a ps3write (CIDFonts are a big part of what such a device would need). Currently the pdfwrite device (which also handles ps2write and eps2write) can emit CIDFonts and CMaps into the body of a PDF file, so conceptually there is no great difficulty with getting these emitted in the PostScript output from ps2write, instead of rendering them to multiple type 3 bitmap fonts, as is currently done. The challenge is to write PostScript code which will take the objects written as PDF objects by the pdfwrite code, and turn them into valid CID-keyed instances of CIDFonts, in a similar fashion to the way the regular font code in opdfread.ps turns the PDF font objects into PostScript fonts. This needs to be switchable, just in case someone is running on a version of PostScript prior to version 2015 when CIDFont support was added. Note that we already have a control 'HaveCIDSystem' but I don't think it currently does anything useful, I certainly don;t think it works.
Ghostscript still rasterizes this sample file on ps2write device; pdfwrite device produces vector output.