Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2282
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!local2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Fri, 22 May 2015 06:35:16 -0500 |
| From | ken <ken@spamcop.net> |
| Newsgroups | comp.lang.postscript |
| Subject | Re: Getting progress data update from Ghostscript |
| Date | Fri, 22 May 2015 12:35:04 +0100 |
| Message-ID | <MPG.2fc924afd41e32af9898fd@usenet.plus.net> (permalink) |
| References | <11365feb-899b-42fa-bbbe-2cb9c96b93b0@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 |
| X-Antivirus | avast! (VPS 150522-0, 22/05/2015), Outbound message |
| X-Antivirus-Status | Clean |
| Lines | 49 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-kUjf3FtBwsazlbIQzG1Izpa/aO26EEmtHGbby1aRr5c8ZdwqsVvPk0HnVjFNHvB/OPWfQeedPiky6w8!xcVcUA3jeHSO1g5PTnFxbo/6QrIjUJNb5RnwLwb7dHhbgTK3lbDxz1sZ4dMbo6ApTWaYSyltgPfF!IotSfyXCQozB+CEl |
| 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 | 3364 |
| Xref | csiph.com comp.lang.postscript:2282 |
Show key headers only | View raw
In article <11365feb-899b-42fa-bbbe-2cb9c96b93b0@googlegroups.com>, kkchan7440@gmail.com says... > > I am looking a way to retrieve progress data from Ghostscript. Something like processing percentage, ripping which page and etc. I am prepare to write some C code to do so. This is for linux platform. There is no way to do this because the interpreter itself doesn't know. THere ar things you can do though 1) PostScript is delivered as a stream of bytes, the interpreter cannot tell how far through a strema it is, because it doens't know how big the input is. However, the sample application delivered with Ghostscript on all platforms (which is what people *think* of as Ghostscript) is not the entire story. You can write a completely different front-end, and that can potentially tell how large an input is, and it knows how many bytes of that input it has delivered to the interpreter, so it can tell what the percentage progress is. So provided you intend to supply files to the application, and not use some kind of network or serial input, you can do ths yourself. It won't be 'Ghostscript' though, at least not as people usually thinkg of GS, it will be your own application which uses the Ghostscript interpreter. 2) Unless the input file is DSC compliant, there is no way to tell how many pages a PostScript program will render. (and even files whch claim to be DSC-compliant are often lying). You can define an EndPage procedure which will allow you to determine how many pages have been processed. Note that neither of these points are relevant when dealing with a PDF file as input. Firstly because the PDF interpreter knows how many pages are in the PDF file, and can deliver them in any order. Secondly, it doesn't know how big the actual input stream is (without some serious digging about in the internals of the PDF file) and the PDF file is not delivered to the PDF interpreter by a stream mechanism. This makes it impossible to know how far through the PDF file the interpreter is. Bear in mind that, unlike a PostScript file, thePDF interpreter does not start at the beiginning and read every byte till it reaches the end. Ken
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Getting progress data update from Ghostscript Peter C <kkchan7440@gmail.com> - 2015-05-22 02:04 -0700
Re: Getting progress data update from Ghostscript ken <ken@spamcop.net> - 2015-05-22 12:35 +0100
Re: Getting progress data update from Ghostscript Peter C <kkchan7440@gmail.com> - 2015-05-22 05:11 -0700
Re: Getting progress data update from Ghostscript ken <ken@spamcop.net> - 2015-05-22 15:15 +0100
csiph-web