Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #861

Re: (embarrassingly) simple showpage question

From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: (embarrassingly) simple showpage question
Date 2012-08-08 10:17 +0100
Message-ID <MPG.2a8c3eb75797db82989899@usenet.plus.net> (permalink)
References <jvsrl9$npu$1@reader1.panix.com> <MPG.2a8c1eaa69cee005989898@usenet.plus.net> <jvt9gu$sgj$1@reader1.panix.com>

Show all headers | View raw


In article <jvt9gu$sgj$1@reader1.panix.com>, 
john@please.see.sig.for.email.com says...

> > Your example doesn't conform to DSC, and this is almost 
> > certainly why it doesn't work as you exepct. 
> > I would imagine [it needs] at least a '%%Pages: 2'. 
> 
> Nope, at least in this case it didn't need a %%Pages: n
> in the prolog (which is fortunate because the program generating
> the ps file won't know how many pages the file will have when it
> opens and initializes the file). But it >>did<< need a %%Page: 1 1
> and a %%Page: 2 2, etc, at the beginning of each page.

"%%Pages; (atend)" with a matching "%%Pages: " in the trailer is an 
acceptable way to resolve this problem, its a commonly used construct 
for exactly this reason.

 
> > Your file also *must* declare itself as being DSC-compliant,
> > by altering %!PS to one of the form %!PS-Adobe-x.y
> 
> Yup, that seems to have been my major blunder. Changing
> my %!PS to your %PS-Adobe-3.0 did the trick. Apparently, I looked
> at everything in the ImageMagick convert example >>except<<
> its absolutely very first line. It was right there in front of
> me all along, and I'd definitely have tried that change
> had I noticed it.

Its easily missed, indeed the fact that all the DSC relies on comments 
can make it very easy to miss altogether....

> showpage and Page, etc. But nothing that I could find that way
> seemed to address creating multiple-page documents.
> I'd have thought it would be one of the first things any
> ps language tutorial would mention.

Well its not strictly the PostScript language, interpreters are 
permitted to ignore comments altogether, the DSC comments are only used 
by document parsing applications (like Ghostview).

DSC is an old extension, when it became apparent that people wanted to 
be able to look at PostScript files, not just print them :-) I guess 
Adobe didn't want to break the concept of streamable files for printing, 
so they came up with a way which worked 'well enough' without altering 
the language at all.

This is pretty much superceded by PDF these days, which has a clear 
structure for jumping around inside the file, and clearly defined start 
and end of pages and resources, so it all works much better. DSC does 
still have uses in printing because a lot of the document processing 
applications still use the comments to rearrange documents, impose them 
onto signatures and so forth.

> Thanks again, Ken,

No problem, I'm glad you got it working so easily,


			Ken

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

(embarrassingly) simple showpage question JohnF <john@please.see.sig.for.email.com> - 2012-08-08 04:58 +0000
  Re: (embarrassingly) simple showpage question ken <ken@spamcop.net> - 2012-08-08 07:59 +0100
    Re: (embarrassingly) simple showpage question JohnF <john@please.see.sig.for.email.com> - 2012-08-08 08:54 +0000
      Re: (embarrassingly) simple showpage question ken <ken@spamcop.net> - 2012-08-08 10:17 +0100
        Re: (embarrassingly) simple showpage question JohnF <john@please.see.sig.for.email.com> - 2012-08-08 10:08 +0000
          Re: (embarrassingly) simple showpage question tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2012-08-08 22:07 -0400
            Re: (embarrassingly) simple showpage question JohnF <john@please.see.sig.for.email.com> - 2012-08-09 05:40 +0000
              Re: (embarrassingly) simple showpage question ken <ken@spamcop.net> - 2012-08-09 08:44 +0100
                Re: (embarrassingly) simple showpage question JohnF <john@please.see.sig.for.email.com> - 2012-08-09 09:38 +0000
                Re: (embarrassingly) simple showpage question JohnF <john@please.see.sig.for.email.com> - 2012-08-10 06:24 +0000

csiph-web