poor quality annotate pdf

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
lxzndr

poor quality annotate pdf

Post by lxzndr »

Hi. I'm trying to create a script to add some text at the bottom of PDF documents for printing. It appeared that ImageMagick would work great for that. It does what I need except for the fact that the PDF quality/resolution is very poor after annotating.

I'm using ImageMagick 6.5.9-10 on SLES10sp2 with gs 8.15.3

command and verbose output:
convert -verbose imagemagick.pdf -gravity SouthWest -annotate +10+10 "$(date +%D) Test User Status:Released" result.pdf
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=/tmp/magick-XXBGdKJt" "-f/tmp/magick-XXs1cYgp" "-f/tmp/magick-XXsK2cSk"
/tmp/magick-XXBGdKJt[0] PNM 612x792 612x792+0+0 8-bit DirectClass 4.363MB 0.040u 0:00.030
/tmp/magick-XXBGdKJt[1] PNM 612x792 612x792+0+0 8-bit DirectClass 4.363MB 0.020u 0:00.019
/tmp/magick-XXBGdKJt[2] PNM 612x792 612x792+0+0 8-bit DirectClass 4.363MB 0.020u 0:00.010
imagemagick.pdf[0] PDF 612x792 612x792+0+0 16-bit DirectClass 4.363MB 0.000u 0:00.000
imagemagick.pdf[1] PDF 612x792 612x792+0+0 16-bit DirectClass 4.363MB 0.000u 0:00.010
imagemagick.pdf[2] PDF 612x792 612x792+0+0 16-bit DirectClass 4.363MB 0.000u 0:00.010
imagemagick.pdf=>result.pdf[0] PDF 612x792 612x792+0+0 16-bit DirectClass 549KB 0.210u 0:05.160

Am I correct in seeing that the -r72x72 could be causing this issue? if so, what do I do to change that? or what else can I try to fix it?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: poor quality annotate pdf

Post by fmw42 »

you have not specified a font or pointsize.

try supersampling of the form

convert -density 288 image.pdf .... -resize 25% result.pdf

Note IM will rasterize and then vectorize. This is not good for quality. see http://www.imagemagick.org/Usage/formats/#vector
lxzndr

Re: poor quality annotate pdf

Post by lxzndr »

I'm ok with the result being a different format if that would help. We wont keep the result, just print it and delete any work files used.

The end result I'm looking for, is to be able to print pdf files with annotations from command line.
Also desire to print them at their original size, 11x8.5 or 17x11 or to be able to resize to the other sizing.

If there is a better way than imagemagick, I'm open to that. I can either process on SLES10 or Windows (do have Acrobat pro 6.0 for windows)
Post Reply