[GRLUG] Split multiplage postscript into individual pages

John Harig radiodurans at yahoo.com
Wed May 7 21:27:29 EDT 2008


I came home from work tonight and saw your posting,
and decided that I would try to come up with a
solution.

I still feel like a newbie but I really want to learn
and I have some LaTeX experience so. . . 

Borrowing from a couple different sources I think I
have come up with an elegant solution. . .and I'm a
bit happy that I figured it out more or less on my own
from references and googling.

1) Install psutils if you haven't already, to use
psselect
2) Write a script with bash for psselect (I don't know
bash but it didn't take me too long to figure this out
with a little help from references)

3) This is what i came up with for your case to enter
at bash prompt:

for page in `seq 1 500`; do psselect -p$page infile.ps
outfile$page.ps; done

I tested it on a 15 page ps (for page in `seq 1 15`)
and it worked perfectly :)

--- Godwin <geektoyz at gmail.com> wrote:

> Thanks John, I'm playing with "ps2pdf", "pdftk" and
> "pdftotext" with
> output to standard out to do this:
> 
> 1. convert original PS to PDF
> 2. Split PDF into individual files (pdftk infile.pdf
> burst)
> 3. Use pdftotext and send output to STDOUT to parse
> (with grep, awk,
> etc.) for the desired string.
> 
> Now I just have to rename the PDF (single page) file
> then finally
> convert to TIFF.  I need individual TIFF images
> named in such a way as
> to have a 3rd party software import those and
> categorize them based on
> their name - so that an in-house web-driven gui
> allows users to
> process them.  Yeah, rather convoluted.  I think I'm
> on the right
> track (for now).  I'll post again if I run into
> something.
> 
> Thanks all,
> G-
> 
> 
> 
> On Wed, May 7, 2008 at 6:33 PM, John J Foerch
> <jjfoerch at earthlink.net> wrote:
> > Godwin writes:
> >   > Oh, I can split/convert to PDF/TIFF alright. 
> The problem is that both
> >   > PS and PDF output have (what I call) "binary"
> output like this:
> >   >
> >
> >  Hi Godwin,
> >
> >  The terms I use are "vector format" and
> "rasterized format".  You
> >  correctly observed that gs can only create
> rasterized output, because
> >  its function is to render documents into bitmaps.
>  This terminology
> >  may not be official, but it is commonly used in
> connection with
> >  imagemagick, a program/library I use a lot.
> >
> >  Do you still need a way to convert vector-PS to
> vector-PDF, or are you set?
> >
> >  --
> >  John Foerch
> >
> >
> > _______________________________________________
> >  grlug mailing list
> >  grlug at grlug.org
> > 
>
http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> >
> 
> 
> 
> -- 
> 
> Ubber::Geek
> http://grlug.org/
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
>
http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
> 



More information about the grlug mailing list