Reputation: 87
I want to create a contact sheet (thumbnails of images) which needs to have a logo at the top left corner, a set of images and notes appended at the end.
I am trying to achieve this by first converting the notes text to a pdf using:
convert -background white -fill black -font arial.ttf -pointsize 36 -size 1024x128 caption:'This is sample text' textPdf.pdf
Then, creating a contact sheet (thumbnails of images with title and caption) by using montage function which returns a pdf with multiple (6) pages. And,
Finally merging the above two pdfs with the logo as below:
convert logo.jpg montage.pdf textPdf.pdf -background none -append contactsheet.pdf
This however, appends all the pages (6) into a single paged pdf which renders the contact sheet useless as on printing this thumnails become too tiny to be identified.
Is there any other way by which I can add a logo at the top of each of the pages of the montage.pdf and append the textPdf.pdf at the end of the last page of the pdf?
Any help in this would be much appreciated.
Upvotes: 2
Views: 505
Reputation: 90213
If I understand correctly, you have this:
logo.jpg
(1 image of unknown dimensions)montage.pdf
(a 6-page PDF with some arbitrary page size)textPdf.pdf
(a 1-page PDF with a very weird page size).You want to create an output PDF of 7 pages named contactsheet.pdf
, where
logo.jpg
with the vertically appended 1st page from montage.pdf
logo.jpg
with the vertically appended 2nd page from montage.pdf
logo.jpg
with the vertically appended 3rd page from montage.pdf
logo.jpg
with the vertically appended 4th page from montage.pdf
logo.jpg
with the vertically appended 5th page from montage.pdf
logo.jpg
with the vertically appended 6th page from montage.pdf
textPdf.pdf
.This result can be achieved with the following command:
convert \
\( logo.jpg tiled.pdf[0] -background none -append \) \
\( logo.jpg tiled.pdf[1] -background none -append \) \
\( logo.jpg tiled.pdf[2] -background none -append \) \
\( logo.jpg tiled.pdf[3] -background none -append \) \
\( logo.jpg tiled.pdf[4] -background none -append \) \
\( logo.jpg tiled.pdf[5] -background none -append \) \
textPdf.pdf \
contactsheet.pdf
It makes use of the following advanced ImageMagick commandline features:
bracketing sub-commands inside \( ... \)
(which each require a space before and after!) to create partial picture results;
using the 0-based [N]
-index to address a particular image/frame/page of a multi-page image or PDF file.
Upvotes: 4