bug-ghostscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GS 7.05 / PDF & pages count


From: Pascal Chapuis
Subject: Re: GS 7.05 / PDF & pages count
Date: Fri, 26 Jul 2002 17:45:55 +0200

I'll send you an email I fairly interested in a "light" PDF parsing !

Many many thanks for advice.

Pascal Chapuis


"Russell Lang" <address@hidden> a écrit dans le message news:
address@hidden
>
> "Pascal Chapuis" <address@hidden> wrote in message
> news:address@hidden
> > Here's what i'm doing :
> >
> > I print on a pseudo printer (postscript compliant) to get a spool file
> > (.SPL) which one I intercept.
> >
> > I convert it to PDF with "gsapi_init_with_args" with argv:
> >
>
ps2pdf -dNOPAUSE -q - -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=Test.PD
> > F  TEST.SPL
> >
> > and call "gsapi_run_string" (on PS file) with :
> >  "statusdict /pagecount known {statusdict begin pagecount 10 string cvs
> > print end flush} if"
> >
> > Then a  TStdioFunction output callback function (set in gsapi_set_stdio)
> is
> > called with OutputValue (%%Page...).
> > I parse this OutputValue to find out the greater page number.
> >
> > Is there a shorter way to do that or is this correct ?
>
> That's a reasonable way to get the true page count of a PostScript
> file (unless somebody wrote some code that produces a random
> number of pages).
>
> > PS: I can't get the pages number with Pdf page object because it's
> > unavailable with only "Acrobat Viewer"... The COM object implementation
> > seems to be in "Acrobat" or "Acrobat Exchange" and I don't want to
deploy
> > extra software with my solution.
>
> I have recently written some code to scan PDF files to extract
> the page count and each page orientation and size.
> Send me email if you are interested in using this.
> My email address is in the GSview documentation.
>
>
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]