Create PDF with page title and multiple images
Posted: 2012-11-01T15:29:54-07:00
Hi all,
I am new to this forum and to the ImageMagick tools, so bear with me.
I have several thousand images that are grouped together using the information from a database file. These images, which can vary in size, are TIFFs that contain two scenes (the two scenes a generally the same height nd width).
What I need to do is create a PDF which has a title at the top of each page which gives the information required (including the total number of images in the PDF) along with the current page number with the total number of pages. The images are arranged 2x5 where scene 0 is on the left and scene 1 is on the right of every image and a border around the two scenes. The images must be set to the same width so that everything lines-up.
I am new to using montage and I have not been able to figure out how to create a title at the top of the page along with the the images, so what I did was to systematically create a title TIFF file, from a script, along with 5 images to create a temporary TIFF page and I continue this until I am done with the images of that group. After that, all the temporary TIFF images are copied together (tiffcp) and then a PDF is created from that with tiff2pdf. Another problem that I encountered with the PDF is that whenever the page did not contain exactly 5 images, the title and images would be pushed down the page and aligned at the bottom. To alleviate this problem, I ensure that I send a number of blank images so that there is always a multiple of 5. That is quite a bit clumsy and very slow and I am sure that there is a better way to do it, but I tried a few different ways and was not successful.
So to summarize here are the problems that I encountered:
1) How to create a dynamic page header
2) How to have all pages align at the top of the PDF (when there are less then 5 images on the page)
As an added bonus, I would like to know if it's possible to add to the PDF a search index that can be used to search from Adobe, for a certain image in the PDF?
I am new to this forum and to the ImageMagick tools, so bear with me.
I have several thousand images that are grouped together using the information from a database file. These images, which can vary in size, are TIFFs that contain two scenes (the two scenes a generally the same height nd width).
What I need to do is create a PDF which has a title at the top of each page which gives the information required (including the total number of images in the PDF) along with the current page number with the total number of pages. The images are arranged 2x5 where scene 0 is on the left and scene 1 is on the right of every image and a border around the two scenes. The images must be set to the same width so that everything lines-up.
I am new to using montage and I have not been able to figure out how to create a title at the top of the page along with the the images, so what I did was to systematically create a title TIFF file, from a script, along with 5 images to create a temporary TIFF page and I continue this until I am done with the images of that group. After that, all the temporary TIFF images are copied together (tiffcp) and then a PDF is created from that with tiff2pdf. Another problem that I encountered with the PDF is that whenever the page did not contain exactly 5 images, the title and images would be pushed down the page and aligned at the bottom. To alleviate this problem, I ensure that I send a number of blank images so that there is always a multiple of 5. That is quite a bit clumsy and very slow and I am sure that there is a better way to do it, but I tried a few different ways and was not successful.
So to summarize here are the problems that I encountered:
1) How to create a dynamic page header
2) How to have all pages align at the top of the PDF (when there are less then 5 images on the page)
As an added bonus, I would like to know if it's possible to add to the PDF a search index that can be used to search from Adobe, for a certain image in the PDF?