Summary: | Regression from 8.71 when handling fonts with "ToUnicode CMaps"? | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | pipitas |
Component: | PDF Writer | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED INVALID | ||
Severity: | minor | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- |
Description
pipitas
2011-03-01 19:28:13 UTC
Created attachment 7301 [details]
Original PDF file used for testing (not "bad" per se, despite its name)
Created attachment 7302 [details]
gs8.71 output of "gs -o out.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress in.pdf"
Created attachment 7303 [details]
gs9.02svn output of "gs -o out.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress in.pdf"
Created attachment 7304 [details]
Another (similar) original PDF where described problem does NOT occur with gs9.0Xsvn
Another
Well, Acrobat appears to like all the files, but I suspect this is because in the 8.71 case it is ignoring the ToUnicode CMap and simply using the character codes. See revision 11170 (Bug #691274), where the first change was made because we were writing an invalid ToUnicode CMap. This altered the emission to follow the specification for CMaps in general by emitting a single byte where possible. This was then reverted in revision 11975 (Bug # 691849) because it caused a regression with Acrobat. Further investigation is documented in revision 11993 (which references bug #691849 and #691862). I suspect that pdffonts is complaining because a ToUnicode CMap is not 2-bytes and 0 padded in the bfrange (the warnings about illegal entries would seem to support this). If you read through the log in revision 11993 you'll see that as far as I can tell the ToUnicode specification does not match what Acrobat actually expects. So technically (from reading the spec) pdffonts is correct, and the ToUnicode CMap is invalid. However in practice the CMap now matches what Acrobat expects. Its rather more important to us that Acrobat search/copy works, than conformance with a non-Adobe validator, so I don't plan to change this. Of course, if you can find a PDF fie which demonstrates that I'm wring in my understanding of the behaviour of Acrobat I will work on this problem some more. |