Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Info on Adobe's %%BeginDataCountAtEnd comment

Status
Not open for further replies.

msampson1

Programmer
May 18, 2004
2
US
I am writing a simple document manager which will allow me to print large (1.5GB) "pre-separated" postscript files. Under certain circumstances I will only want to output 1 separation (or Page) from the file. I've found that I can't count on skipping whole pages since some postscript files don't conform to DSC. For instance, some documents define resources in the first page that are needed by all pages that follow it. Therefore, it is necessary to process the first page along with the page I want to output.

To get around this, my document manager looks for DSC comments that it can use to filter out large chunks of page content. This is done to minimize the amount of code sent to the interpreter for pages that will not be output. My problem is that I came across an adobe illustrator file that doesn't use the comments I count on to perform the filtering(%%BeginDocument, %%BeginObject, %%BeginData, and %%BeginBinary). Instead it uses a %%BeginDataCountAtEnd and %%EndDataCountAtEnd comment around image data. I haven't been able to find any information on this particular comment. It appears to be DSC but I'm not sure. I am looking for any information on this particular comment and would welcome any information regarding other undocumented DSC comments I could use to perform my task.
 
Illustrator breaks all the rules. You won't find half of what the program outputs referenced anywhere. It's as if the developers said a long time ago "we're going to do what we think we need to do, and to heck with the specs". EPS files that make calls to setpagedevice, special "private dictionaries", and as you've seen, totally undocumented comments.

Here is the only semi-offical extention of DSC you'll find:




Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 
Thanks for your quick response. This is exactly what I thought due to the lack of information on the net. I can check for this particular comment in my parsing code but due to the lack of standard with Postscript I am worried that other postscript writers might pull this same stunt. What percentage of postscript writers tend to use the comments I have mentioned (i.e BeginData, BeginBinary, so forth). If it is a majority then I feel a little more comfortable adding a check here or there for undocumented comments. We need to support a broad range of postscript files and I don't want to get caught up in a maintenance nightmare.

One other question is whether I could use the %%PageOrder comment to filter out entire pages. The PLRM makes it sound like %%PageOrder: Special is the only time the pages have to be output in the specified order. Is this true? It seems like I came across a postscript file that used %%PageOrder: Ascend but it defined resources in the first page that were needed by all other pages (obviously not DSC compliant). My interpretation of the PLRM is that a document manager should be able to swap pages under this circumstance. The "Ascend" value is just to inform the doc manager the original order of the pages. Am I wrong on this? Do postscript writers tend to use this comment correctly?

Thx in advance!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top