[LOW] STR #1907: Problem printing GMT PostScript

Helge Blischke h.blischke at srz.de
Tue Aug 15 05:31:56 PDT 2006


John M Kuhn wrote:
> Helge Blischke wrote:
> 
>>Michael Sweet wrote:
>>
>>>[STR Closed w/o Resolution]
>>>
>>>This file does not conform to the Adobe Document Structuring Conventions,
>>>yet claims to be conformant.
>>>
>>>The main issues are:
>>>
>>>    1. There are two %%EndProlog comments in the file
>>>    2. The #copies variable is set outside the Begin/EndSetup block and
>>>does not use Begin/EndFeature, making it impossible to override the number
>>>of copies.
>>>    3. The scale command in the Begin/EndSetup block is illegal in that
>>>context - it must appear in the Begin/EndPageSetup since it affects the
>>>graphics state.
>>
>>That is not true. The DSC spec (5001.DSC_Spec_v3.0.pdf) states concerning
>>the setup section:
>>	� The document setup section is denoted by the %%Begin(End)Setup
>>	comments. The document setup should consist of procedure calls for
>>	invoking media selections (for example, setting page size), running
>>	initialization routines for procsets, downloading a font or other resource,
>>	or setting some aspect of the graphics state. This section should appear
>>	after the %%EndProlog comment, but before the first %%Page: comment.
>>and, later on, dealing with page independence:
>>	Pages should not have any inter-dependencies. Each page may rely on
>>	certain PostScript language operations defined in the document prolog or in
>>	the document setup section, ...
>>
>>Thus, the scale command in the setup section is perfecly legal (though the cited
>>document warns on possible pitfalls by relying in graphics state settings in the
>>document setup section later on.
> 
> 
> I want to thank Helge and Michael for helping me to understand
> the printing problem that I am having.  I have contacted the GMT
> authors and they are going to move the scale command to the
> PageSetup.
> 
> I am not an expert on PostScript, but what I have read indicates
> that anything that would be affected by initgraphics, such as
> scale, should not be done in the Setup block.
> 
> John

As for your last paragraph: it has been good practice (by Adobe as well)
ever since to put stuff (including graphics state setup) which is common
to *all* pages of a job - into the job's setup section. E.g. think of
color space definitions converted from an ICC profile; the defining array
for a high quality color image usually is about half a megabyte. To put this
stuff repeatedly (think of page independence!) into the page setup sections
will bloat the PS job severely.

But, to be honest, moving the scale statement into the page setup is surely
OK.

Helge


-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups-devel mailing list