You can convert directly to PDF with this command:
- convert $FILENAME.tif -font helvetica -pointsize $POINTSIZE -gravity south -annotate 0 "$TIMESTAMP" $FILENAME.pdf
You can remove the memory load from your server but make the process slower by adding
- -limit memory 64 -limit map 64
to your command line. You may get a speed-up by separating your multi-page document into separate image files and annotate one at a time.