🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.postscript.programming
Article #477

Re: selective extract of pages and convert to tiff or pdf for web view

#477
From: Aandi_Inston
Date: Fri, 02 Jul 2004 07:58
33 lines
2055 bytes
If a PostScript file really is DSC compliant, extracting pages is a
fairly simple mechanical process. For instance, the information that
marks page 431 should follow a line

%%Page: 431 431

and run to %%EndPage or the next %%Page: line. It's not quite a simple
as that might suggest, but it is at least doable - without DSC it may
not be possible at all.

I have heard of a tool psselect that supposedly can extract pages from
a DSC compliant file and save it as a new valid file.

(Why may it be impossible?  Consider this code

/pagenumber 1 def
10  % repeat count
{
  /Helvetica 20 selectfont 72 500 moveto % prepare to show text
  pagenumber 10 string cvi % convert pagenumber to string
  show % write page number
  showpage % finish page
  /pagenumber pagenumber 1 add def  % increase pagenumber
}
repeat

This page writes 10 pages, each with a number. Clearly, you cannot use
any simple "cut here" logic to extract page 3. That's not to say the
task cannot be done; typically the entire file would be converted to
PDF, then PDF pages extracted, and finally a new PostScript file
written)

Aandi Inston
Technical Details
Message-ID: <40e5146a.2480501452@adobeforums.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!webx
References: <3bb4ddfd.-1@webx.la2eafNXanI> <3bb4ddfd.6@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,2db84f087b3b5238
X-Google-Attributes: gid10c61a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Aandi_Inston@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.postscript.programming
Subject: Re: selective extract of pages and convert to tiff or pdf for web view
Message-ID: <40e5146a.2480501452@adobeforums.com>
Date: Fri, 2 Jul 2004 00:58:46 -0700
References: <3bb4ddfd.-1@webx.la2eafNXanI> <3bb4ddfd.6@webx.la2eafNXanI>
Lines: 33
X-Newsreader: Forte Free Agent 1.21/32.243
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit