[clug] Howto change /Title in PDFs?

Scott Ferguson scott.ferguson.clug at gmail.com
Wed Aug 15 00:04:11 MDT 2012

Not solved - but working. Still think there must be a way to set the PDF
title in ImageMagick

On 15/08/12 14:48, Scott Ferguson wrote:
> On 15/08/12 13:51, Alex Satrapa wrote:
>> On 15/08/2012, at 13:05 , Scott Ferguson
>> <scott.ferguson.clug at gmail.com> wrote:
>>> Any suggestions for simple methods to change/create the Title for
>>> PDFs?
>>> The Title I wish to apply to the PDFs is the same as the PDF
>>> file-name minus the .pdf extension, `date "+%H%M_%d-%m-%Y"`
>>> scanbuttond (get button push) > scanimage (GRAY 8-bit) >
>>> imagemagick (convert to jpg) > imagemagick (convert to small pdf)
> 1. scan to Gray scale image (PBM) as /tmp/scanimage
> 2. "convert" /tmp/scanimage (PBM) to /tmp/scanimage.jpg (lazy way to
> small PDF)
> 3. "convert" /tmp/scanimage.jpg to
> ~/Documents/Pictures/Scanned/$TIMESTAMP.pdf
> 4. ? (pipe through titling process, and remove scanner lock file)
> 5. email ~/Documents/Pictures/Scanned/$TIMESTAMP.pdf
> 6. remove tmp files, rinse and repeat.

Until I can figure out how to fully exploit ImageMagick I'm just using:-
sed -ib 's|/tmp/scanimage.pdf|'${TIMESTAMP}'|' $TMPFILE.pdf

Seems ghostscript could be used to set the title, but that would mean
installing more packages when imagemagick is already needed for other
image processing work.

Kind regards

More information about the linux mailing list