Page 1 of 1

conversion progress?

Posted: 2010-03-24T15:10:05-07:00
by ebgb
new here, finally joined! usually everything I've ever needed to know has already been answered! respect!!

anyhoo...

can't find anything to help with my current conundrum, and it might not even be possible anyway...

using php, to convert a pdf to a png and then create a thumbnail

no problem there, all works tickety boo. The pdf's are all single page docs, but are big. lots of vector stuff going on as well as embedded raster images in each file. some may be 30meg or so in size

can sometimes take 4 or 5 minutes for the the magick to happen, so was wondering if there is any mechanism to provide some kind of feed back - a progress bar if you will to display tot he user browser side>>

something a bit ajax'y perhaps??

or am I just wishing for the moon again!

Re: conversion progress?

Posted: 2010-03-24T15:12:45-07:00
by fmw42
IM is a command line system basically. So the only thing I know that is built into IM is the IM function -monitor

see http://www.imagemagick.org/script/comma ... hp#monitor and http://www.imagemagick.org/Usage/basics/#controls

it display progress per command to the terminal in a continuous numerical fashion as it processes line-by-line.

Re: conversion progress?

Posted: 2010-03-24T15:25:59-07:00
by ebgb
I should have made it a bit clearer, my bit of magick is happening thorugh a web page via php

was hoping for something I can feed back to php or javascript even to show some sort of progress to the end user

Re: conversion progress?

Posted: 2010-03-24T15:50:35-07:00
by fmw42
I understood that. But that was all I could off. With static return to terminal, you can get that info from the exec command into an array. I would not know how to take the dynamic return and export that via exec. Perhaps one of the PHP experts can come up with something.

I don't know if this is relevant or not, but if you search Google for "PHP progress bar", you get a lot of returns.

Re: conversion progress?

Posted: 2012-03-01T05:29:27-07:00
by goldskif
Is it possible to use the PV of the Debian ?????
% sudo aptitude install pv

USAGE
%tar -cf - . | pv -cN tar -s $(du -sb | grep -o '[0-9]*') | gzip | pv -cN gzip > out.tgz
tar: 97.1MB 0:00:08 [12.3MB/s] [>......................] 0% ETA 1:50:26
gzip: 13.1MB 0:00:08 [1.6MB/s] [....<=>................]