I'm doing a 3 step process.
1. Starting with two images
2. Add text to those images with -annotate
3. Combe the two images into a 2-page PDF.
The problem is that the resulting PDF shows page 1 then gives an error, "There was a problem reading this document (14)".
If, however, I combine the original GIF images, before adding text, I get a working 2-page PDF.
I have tried these steps on two different servers. One running CentOS the other Debian Etch. I ran the examples for this write-up under Etch and using ImageMagick 6.2.4 02/10/07 Q16.
Reproducing The Problem
Step 1
The files I start with are online at the URLs below:
https://secure.utahfastpass.org/admin/U ... yForm2.gif
https://secure.utahfastpass.org/admin/U ... yForm3.gif
I place those files in my /tmp directory.
Step 2
I annotate the first file (Form2) with the following command. This just does a bunch of annotations.
Code: Select all
convert /tmp/UFP2008EntryForm2.gif -pointsize 20 -fill blue -annotate +154+382 "Joel Dare" -annotate +166+416 "My Address" -annotate +131+447 "Roy" -annotate +644+447 "UT" -annotate +990+447 "84067" -annotate +152+480 "801-555-1212" -annotate +634+480 "801-555-3434" -annotate +1011+480 "800-555-9898" -annotate +128+511 "800-555-7676" -annotate +648+511 "joel@example.com" -annotate +85+598 "None; None; None" -annotate +726+659 "300" -annotate +441+691 "60" -annotate +604+691 "40" -annotate +786+691 "0" -annotate +361+717 "95" -annotate +510+767 "X" -annotate +873+767 "2007-12-25" -annotate +150+947 "Bob Doe" -annotate +746+947 "801-555-1212" -annotate +204+1168 "1976-04-06" -annotate +734+1168 "None" -annotate +271+1202 "None" -annotate +335+1232 "None" -annotate +254+1265 "Kim Doe, PA" -annotate +877+1265 "801-555-9876" /tmp/UFP2008-Pg2-1000.png
Code: Select all
convert /tmp/UFP2008EntryForm3.gif -pointsize 20 -fill blue -annotate +154+382 "Joel Dare" -annotate +166+416 "My Address" -annotate +131+447 "Roy" -annotate +644+447 "UT" -annotate +990+447 "84067" -annotate +152+480 "801-555-1212" -annotate +634+480 "801-555-3434" -annotate +1011+480 "800-555-9898" -annotate +128+511 "800-555-7676" -annotate +648+511 "joel@example.com" -annotate +85+598 "None; None; None" -annotate +726+659 "300" -annotate +441+691 "60" -annotate +604+691 "40" -annotate +786+691 "0" -annotate +361+717 "95" -annotate +510+767 "X" -annotate +873+767 "2007-12-25" -annotate +150+947 "Bob Doe" -annotate +746+947 "801-555-1212" -annotate +204+1168 "1976-04-06" -annotate +734+1168 "None" -annotate +271+1202 "None" -annotate +335+1232 "None" -annotate +254+1265 "Kim Doe, PA" -annotate +877+1265 "801-555-9876" /tmp/UFP2008-Pg3-1000.png
Finally, I combine the resulting 2 images into a 2-page PDF with the following command.
Code: Select all
convert -density 150 /tmp/UFP2008-Pg2-1000.png /tmp/UFP2008-Pg3-1000.png /tmp/UFP2008-1000.pdf