I have a very specific requirement where i must automatically stamp every page of a PDF file (for a faxing application), so here's the process i've made:
- step 1: Convert PDF to PNG, one png file per page
>cmd1: gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -r400 -sOutputFile=image_raw.png input.pdf
>cmd2: mogrify -resize 31.245% image_raw.png
>input.pdf (input): https://www.dropbox.com/s/p2ajqxe99nc0h8m/input.pdf
>image_raw.png (output): https://www.dropbox.com/s/4cni4w7mqnmr0t7/image_raw.png - step 2: Stamp every PNG file (using a third party tool ..)
>image_stamped.png (output): https://www.dropbox.com/s/3ryiu1m9ndmqi ... tamped.png - step 3: Reconvert PNG files into one PDF file
>cmd: convert -resize 1240x1753 -units PixelsPerInch -density 150x150 image_stamped.png output.pdf
>output.pdf (output): https://www.dropbox.com/s/o9y0jp9b4pm08ci/output.pdf
What is the best parameters to play with at input (step 1) or output (step 3) ?
Thanks !