Logo JPG on multi page 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
Hedgehoguse
Posts: 4
Joined: 2012-02-05T20:15:31-07:00
Authentication code: 8675308

Logo JPG on multi page PDF

Post by Hedgehoguse »

Hello,
I want to place a logo on each page of the PDF file. I'm trying:

Code: Select all

convert ( file.pdf[0] water.jpg -gravity NorthWest -compose multiply -composite ) file.pdf -delete 1 result.pdf
But the logo put on the first page only.
Thanks for help.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Logo JPG on multi page PDF

Post by Bonzo »

file.pdf[0]
This is telling IM to use page 1 only - try removing the [0]
Hedgehoguse
Posts: 4
Joined: 2012-02-05T20:15:31-07:00
Authentication code: 8675308

Re: Logo JPG on multi page PDF

Post by Hedgehoguse »

Thank you!
I still do not quite understand the syntax IMagick.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Logo JPG on multi page PDF

Post by Bonzo »

You are not using Imagick but command line.

Imagick is built into php whereas Imagemagick can be run from the command line in php.

There are lots of examples here: http://www.imagemagick.org/Usage/

Are you using it from php ? as I have some examples on my site as well.
Hedgehoguse
Posts: 4
Joined: 2012-02-05T20:15:31-07:00
Authentication code: 8675308

Re: Logo JPG on multi page PDF

Post by Hedgehoguse »

Yes, I do it in PHP, but it's easier to think using the command line. Pardon :oops:
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Logo JPG on multi page PDF

Post by anthony »

WARNING: ImageMagick will rasterize the PDF. that is it will convert the internal vector format of a PDF to a pixmap!
This may be detrimental to what you are after!

A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply