Odd form of comment: "%Begin Resource"
Mike Breeden <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.devel |
|---|---|
| Message-ID | <[email protected]> |
I have been using [%%Creator: GPL Ghostscript GIT PRERELEASE 908 (ps2write)] to process PDF files to PostScript. Sometimes viewing them in GhostView, I get a warning dialog box: ------------------------------------------------------Document Structuring Conventions DSC Warning at line 3613:%EndProlog %%BeginResource: /%%EndResource The number of Begin and End comments do not match------------------------------------------------------- Sure enough, looking in the PostScript file with a text editor shows that sometimes there is a tag "%BeginResource" with only a single leading '%' sign instead of the usual two '%' characters. It seems to happen only in tags like:-------------------------------------------------------%BeginResource: file (PDF FontFile obj_30)30 0 obj<</Filter[/ASCII85Decode/LZWDecode]/Length1 33844/Length 38146>>stream-------------------------------------------------------That type of code block seems always to preceed a large block of characters that probably is actually a character representation of hex data. The "%%EndResource" tag always has both leading '%' characters. If I select "Ok" at the warning in GhostView, I will see the page displayed correctly. Also, the file prints correctly.The first question is why would this happen? Why the missing '%'?If I then manually go in and insert the (5 out of 30 tags) missing '%' characters, GhostView will open the document without any warnings. I can live with that. I wrote some code to automatically correct the document by converting "%BeginResource" to "%%BeginResource". The documents print fine. Now how we process documents for printing is to concatenate a bunch of files together (maybe 20 Meg) and send them to the printer as a single job. If I do that with the corrected files, I get an error after or during the printing of the second corrected document. It does not happen with uncorrected documents. Before stopping, the printer does print a message:-------------------------------------------------------ERROR:undefinedOFFENDING COMMAND:amStack:--nostringval--5------------------------------------------------------- Does anyone have any idea what that means? Thank you, Michael _______________________________________________ gs-devel mailing list [email protected] http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel