Summary: | Improve pdfmark processing to handle unusual names in named destinations | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | KSK <sudhakar1k> |
Component: | PDF Writer | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P4 | ||
Version: | 9.07 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- | |
Attachments: | Encounter Error message while converting the PS to PDF |
Description
KSK
2013-05-29 08:49:58 UTC
Created attachment 9913 [details]
Encounter Error message while converting the PS to PDF
The file uses pdfmarks to create a variety of structures in the output PDF file. In particular it makes use of named destinations and Link annotations (it also uses the obselete /LNK method). The names of the destinations use Unicode (UTF-16BE) strings, which are converted into PostScript names in order to use the pdfmark syntax. Now, names in PDF cannot contain certain characters (unlike PostScript) and these include 0x00. So we cannot create a name in PDF which contains UTF-16. As a result we cannot create a simple annotation with a named destination which is actually a name object. It is possible to work around this, by using a string to contain the name, and then creating a names table which maps strings to destinations, and this is what Acrobat does to solve this. At present pdfwrite does not construct a names table for named destinations, so we cannot use this approach. This results in the error you see, because we are unable to process the pdfmark in the PostScript. This commit 2d04d5942b3e97b06a7ac4ed767a6c481d4421f4 resolves the problem, but note the caveats in the commit log. Thanks Ken. We looking forward for the patch this will be sort out my problem. Thanks & Regards, KSK Hi ken, Thanks for fixing the bug. Am new to this GS. I dont know where to download those files and how to compile. Is there any guide to help me out? Thanks, KSK (In reply to comment #5) > Am new to this GS. I dont know where to download those files and how to > compile. Is there any guide to help me out? The commit in comment 3 is a hyperlink, if you click it you will get to the commit page, which includes a diff of the changes (as well as the explanatory commit log). There you can get a diff of each changed file individually, a diff containing all the changes to the files in one go, or a 'snapshot' which is a download of the entire Ghostscript source at that point (if you don't feel you can apply a diff). Since you are on Linux you should be able to use the 'patch' utility to apply the diff to the released source. You then have to build Ghostscript, you will find instructions in the Ghostscript directory; /ghostpdl/gs/doc/make.htm Ken, Once again Thankyou. Its workfing fine. Also am very much happy to use this Ghostscript and for your swift response. Thanks & Regards, KSK When trying the below command I received the following Error Message : UseCIEColor for UseDeviceIndependentColor Ghostscript Version : GPL Ghostscript GIT PRERELEASE 9.08 Command : gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dBATCH -sOutputFile=out.pdf input.ps GPL Ghostscript GIT PRERELEASE 9.08 (2013-01-29) Copyright (C) 2012 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. GPL Ghostscript GIT PRERELEASE 9.08: Set UseCIEColor for UseDeviceIndependentColor to work properly. Unrecoverable error: stackunderflow in .setdistillerparams Kindly advise me how to handle this. (In reply to comment #8) > When trying the below command I received the following Error Message : > UseCIEColor for UseDeviceIndependentColor Please don't add to closed bugs! > This software comes with NO WARRANTY: see the file PUBLIC for details. > GPL Ghostscript GIT PRERELEASE 9.08: Set UseCIEColor for > UseDeviceIndependentColor to work properly. > Unrecoverable error: stackunderflow in .setdistillerparams > > > Kindly advise me how to handle this. The message says it all 'Set UseCIEColor for UseDeviceIndependentColor to work properly'. |