On Tue, Aug 25, 2009 at 02:06:57PM +0000, Imran Malik 
<[email protected]> wrote:
> First i want to convert pages without poly2bitmap. And on error,
> pdf2swf should auto-covnert single page with poly2bitmap and move to
> next page without poly2bitmap.

Try something like this:

    pagenum=`pdfinfo file.pdf | grep Pages | sed 's/^[^0-9]*\([0-9]\+\)$/\1/'`
    for i in `seq $num_pages`;do (pdf2swf -s breakonwarning -p$i file.pdf -o 
page$i.swf || \
                                  pdf2swf -s poly2bitmap    -p$i file.pdf -o 
page$i.swf); \
    done
    swfcombine --cat page*.swf -o file.swf

Be aware that the output file might be larger, as you run single
conversion processes for each page, hence fonts and bitmaps are 
duplicated.

Matthias




Reply via email to