Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #862
| From | JohnF <john@please.see.sig.for.email.com> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: (embarrassingly) simple showpage question |
| Date | 2012-08-08 10:08 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <jvtdqm$f7b$1@reader1.panix.com> (permalink) |
| References | <jvsrl9$npu$1@reader1.panix.com> <MPG.2a8c1eaa69cee005989898@usenet.plus.net> <jvt9gu$sgj$1@reader1.panix.com> <MPG.2a8c3eb75797db82989899@usenet.plus.net> |
ken <ken@spamcop.net> wrote: > 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. Thanks, Ken, I'll program that in, too. And now that you've mentioned it, I've googled it for more info. But there's no way I could have discovered it on my own beforehand (except sheer dumb luck). >> > 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. I googled "pdf programming", which doesn't seem quite so straightforward as ps, and way fewer documents discussing it, as far as I could tell. I've had several assembly programming jobs (now mostly C), so ps doesn't really seem intimidating, if less well structured. But pdf seemed pretty opaque to me at first blush. >> Thanks again, Ken, > No problem, I'm glad you got it working so easily, Well, needle in haystack -- easy to remove, hard (for me) to find. I wasted half a dozen hours, convinced that with the working "convert page1.ps page2.ps twopages.ps" example in hand, I ought to be able to quickly find the relevant difference with my non-working example. (And now that you've explained it, I should have.) Thanks, -- John Forkosh ( mailto: j@f.com where j=john and f=forkosh )
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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