Thursday, December 18, 2014

Pdf Tricks on Arch

Here're some more arch tips and tricks so I don't forget them.

Merge Pdfs into one big Pdf:

Using ghostscript this is pretty easy (ghostscript is part of a standard Tex install):

$gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=file.pdf Input1.pdf Input2.pdf Input3.pdf

Problems, the metadata for the new file will be that of the last file, if this needs to be changed there's a way.

Changing Metadata for Pdf's on Arch Linux

Using exiftool this isn't too bad, bugs with paths associated with exiftool seem to have been fixed, and it's in the official repository (perl-image-exiftool).

$exiftool -Title="Title" -Author="Author" -Subject="Subject" file.pdf

Note that this creates a new file called file_original.pdf, which is surprisingly enough the original file. The modified version will be file.pdf.

Also for information on which tags are present use:

$exiftool file.pdf

No comments:

Post a Comment