🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6631

Re: number of pages

#6631
From: Chris Lewis
Date: Mon, 11 Jan 1993 06:12
31 lines
1556 bytes
In article <4749@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes:
>In article <1993Jan8.172822.12211@wavehh.hanse.de> cracauer@wavehh.hanse.de (Martin Cracauer) writes:
><I an using:

><grep "Page: " | wc

And what if your document also has the text "Page:" in it somewhere?
Please, use

	grep '^%%Page:' | wc

Even that won't work if you're working with nested documents which
may have embedded (but igonred) %%Page directives too.

>If the PostScript file was DSC compliant, then "grep %%Pages:" would be
>enough.  If you get back nothing, then it was either a one page document
>(where the %%Pages wasn't necessary) or it wasn't DSC compliant, which means
>that the grep idea won't work.

I've seen supposedly DSC compliant code emitting %%Page, but not %%Pages:.
Somestimes a "%%Pages: (atend)", but forgot to do the real one at the end...

It's simple enough to try both and see what comes out.

Not very reliable tho.

Consult the FAQ.
-- 
Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
Ferret list: ferret-request@ferret.ocunix.on.ca
Technical Details
Message-ID: <4119@ecicrl.ocunix.on.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!ecicrl!clewis
References: <1993Jan6.163958.27417@hubcap.clemson.edu> <1993Jan8.172822.12211@wavehh.hanse.de> <4749@vidiot.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!ecicrl!clewis
From: clewis@ferret.ocunix.on.ca (Chris Lewis)
Newsgroups: comp.lang.postscript
Subject: Re: number of pages
Message-ID: <4119@ecicrl.ocunix.on.ca>
Date: 11 Jan 93 06:12:15 GMT
References: <1993Jan6.163958.27417@hubcap.clemson.edu> <1993Jan8.172822.12211@wavehh.hanse.de> <4749@vidiot.UUCP>
Organization: Elegant Communications Inc., Ottawa, Canada
Lines: 31