This project is read-only.

Get progress for a single page?

Nov 17, 2014 at 3:43 PM

Is there any possibility to get GS' progress while rasterizing a single page?
I mean if I'm going to convert a large format PDF file to a TIFF (using tiff24nc device), this process may take several minutes and it would be great to have some kind of progress ;-)
Nov 19, 2014 at 9:50 AM

The thing is that the Native Ghostscript library doesn't support any progress events/callbacks except the Page number that's being processed at that time. So, I'm afraid that what you are looking for is not possible.

Nov 19, 2014 at 4:38 PM
Thanks for your response. Maybe it could be possible if feeding the input using a pipe and just monitor how much data GS already "ate" ...
Nov 19, 2014 at 4:50 PM

I'm afraid that this will not be helpful....

The thing is that the PDF language, unlike the PostScript language, inherently requires random access to the file. If you provide PDF directly to Standard Input or via PIPE, Ghostscript will copy it to a temporary file before interpreting the PDF.

Nov 21, 2014 at 6:22 PM
Hi Jossip,

ahh, I see. Reading the documentation sometimes helps a lot ;-)
Then I guess I'll simply count the output bytes because I'm redirecting them uncompressed to a pipe (same problem here: tiff24nc also needs random access so I'm using bmp16m instead). As I know the target size, this seems to be the only point to get somekind of progress.

Thanks for your help and this great project!