Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #126
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Sat, 23 Apr 2011 10:10:43 -0500 |
| From | ken <ken@spamcop.net> |
| Newsgroups | comp.lang.postscript |
| Subject | Re: PDF: multiple slides per page to one slide per page? |
| Date | Sat, 23 Apr 2011 16:10:39 +0100 |
| Message-ID | <MPG.281cfc403305e78498982f@usenet.plus.net> (permalink) |
| References | <7d554826-c2b6-4dff-a363-8e8bf16c6798@r19g2000prm.googlegroups.com> <MPG.27e30eeb4abd417798981e@usenet.plus.net> <fb141551-05f0-47a3-8ef3-418c2bfc4dce@h9g2000pre.googlegroups.com> |
| Reply-To | ken@spamcop.net |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Transfer-Encoding | 7bit |
| User-Agent | MicroPlanet-Gravity/3.0.4 |
| Lines | 72 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-ii0IpAHyo3ThUCwB0xngRN87P42lgXWluKBh5s46Ao+uB4LCc9Y7xtF8WM8Wrlt+WRg7DAawOPspy0O!OqDCpl+5Xb9nRt0VBIu8IZSPBXNWMqJQRrsg3BiIACjcGJVMs9w84G1buKbYNZosn0PLwHAps5a4!PgA3QER9AfUVHXs= |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 3494 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.postscript:126 |
Show key headers only | View raw
In article <fb141551-05f0-47a3-8ef3-
418c2bfc4dce@h9g2000pre.googlegroups.com>, dmathog@gmail.com says...
> convert are marked up 4 to a page. So I made this change (the
> coordinates match my input):
>
> 1 1 PDFPageCount {
> dup
> % 1 of 4
> <</PageSize [330 248] /PageOffset [-42 326]>> setpagedevice
> pdfgetpage
> dup /Page exch store
> pdfshowpage_finish
> % 2 of 4
> <</PageSize [330 248] /PageOffset [-420 326]>> setpagedevice
> pdfgetpage
> dup /Page exch store
> pdfshowpage_finish
> % 3 of 4
> <</PageSize [330 248] /PageOffset [-42 38]>> setpagedevice
> pdfgetpage
> dup /Page exch store
> pdfshowpage_finish
> % 4 of 4
> <</PageSize [330 248] /PageOffset [-420 38]>> setpagedevice
> pdfgetpage
> dup /Page exch store
> pdfshowpage_finish
> } for
>
> And it blows up on the 3rd one. The odd thing is that any 2 of the
> subpages will work, but if there are 3 (or more) of them it crashes.
> It will crash on the 3rd instance of the same subpage (ie, do 1 of 4
> three times in a row). In the following example the first two
> >>showpage were the successful displays, and what follows is what
> transpired after the second (return):
>
> GPL Ghostscript 9.02 (2011-03-30)
> Copyright (C) 2010 Artifex Software, Inc. All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
>
> >>showpage, press <return> to continue<<
>
> >>showpage, press <return> to continue<<
>
> Error: /stackunderflow in --index--
> Operand stack:
Silly me, its quite obvious when I think about it.
THe pdf_slice.ps program is intended to deal with 2 pages, and
pdfgetpage takes the page count from the stack so it knows which page to
use. So this:
1 1 PDFPageCount {
dup
...
...
} for
takes the current index of the loop counter, which is pushed on the
stack each time round the loop by the 'for' operator, and copies it. So
we haev 2 copies of the page index on the stack.
Obviously if we then call pdfgetpage 3 times, we will be short of one
copy :-)
So if you change 'dup' to 'dup dup dup' (or as many as are required for
the number of sub pages -1) then ti will work better :-)
Ken
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar
Re: PDF: multiple slides per page to one slide per page? David Mathog <dmathog@gmail.com> - 2011-04-22 09:03 -0700
Re: PDF: multiple slides per page to one slide per page? David Mathog <dmathog@gmail.com> - 2011-04-22 10:41 -0700
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-22 19:36 +0100
Re: PDF: multiple slides per page to one slide per page? David Mathog <dmathog@gmail.com> - 2011-04-22 13:01 -0700
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-22 21:50 +0100
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-22 19:33 +0100
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-23 16:10 +0100
Re: PDF: multiple slides per page to one slide per page? David Mathog <dmathog@gmail.com> - 2011-04-23 08:50 -0700
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-23 21:29 +0100
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-25 12:03 +0100
Re: PDF: multiple slides per page to one slide per page? David Mathog <dmathog@gmail.com> - 2011-04-26 08:40 -0700
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-26 17:21 +0100
Re: PDF: multiple slides per page to one slide per page? David Mathog <dmathog@gmail.com> - 2011-04-26 13:23 -0700
Re: PDF: multiple slides per page to one slide per page? ken <ken@spamcop.net> - 2011-04-27 08:31 +0100
csiph-web