Discussion:
Creating PDF by importing all the images from tiff file having multiple pages.
aashish_shah
2011-03-17 17:30:21 UTC
Permalink
Can someone let me know how to create a pdf file by importing all the
images from a tiff (tagged image file format) file having multiple
pages. I tried with the image_tiff() api call from PDF::API2 module but
it is importing only the 1st page instead of importing all the pages.
Here's the sample program which I tried.

<code>
use PDF::API2 #image file having multiple pages of images. my
$image_file = "multi_image.tiff"; my $pdf = PDF::API2->new(-file =>
"$0.pdf"); #add a blank page. my $page = $pdf->page(); #adding a content
object for pictures. my $image_content = $page->gfx; #get a tiff image
object. my $tiff = $pdf->image_tiff($image_file); #adding image at (0,0)
x, y coordinates $image_content->image($tiff, 0, 0, 300, 300);
$pdf->save(); $pdf->end();

</code>
Rick
2011-03-17 20:44:56 UTC
Permalink
Post by aashish_shah
Can someone let me know how to create a pdf file by importing all
the images from a tiff (tagged image file format) file having
multiple pages. I tried with the image_tiff() api call from
PDF::API2 module but it is importing only the 1st page instead of
importing all the pages. Here's the sample program which I tried.
Back in 2003, I was faced with this problem, and had to "cut" the
tiff images into individual pages for importation into the PDF.


Rick
Jeffrey Ratcliffe
2011-03-17 20:55:10 UTC
Permalink
Post by Rick
Post by aashish_shah
Can someone let me know how to create a pdf file by importing all
the images from a tiff (tagged image file format) file having
multiple pages. I tried with the image_tiff() api call from
PDF::API2 module but it is importing only the 1st page instead of
importing all the pages. Here's the sample program which I tried.
Back in 2003, I was faced with this problem, and had to "cut" the
tiff images into individual pages for importation into the PDF.
This is what I do in gscan2pdf. However, if you are just interested in
turning a multipage TIFF into PDF, then there is always tiff2pdf

Regards

Jeff
aashish_shah
2011-03-18 01:09:22 UTC
Permalink
Thanks for your responses. I noticed that tiff2pdf is a separate utility which you need to purchase. Also found that its mostly for windows platform. Do you know if tiff2pdf is available for Linux platform ?

Ideally I would like to convert all the pages in tiff image to pdf programatically in Perl using some perl module rather than purchasing a utility to do the conversion. If you know of any other perl module
which can convert all the pages in tiff image to pdf, please let me know.

Thanks once again for your responses.
Post by Jeffrey Ratcliffe
Post by Rick
Post by aashish_shah
Can someone let me know how to create a pdf file by importing all
the images from a tiff (tagged image file format) file having
multiple pages. I tried with the image_tiff() api call from
PDF::API2 module but it is importing only the 1st page instead of
importing all the pages. Here's the sample program which I tried.
Back in 2003, I was faced with this problem, and had to "cut" the
tiff images into individual pages for importation into the PDF.
This is what I do in gscan2pdf. However, if you are just interested in
turning a multipage TIFF into PDF, then there is always tiff2pdf
Regards
Jeff
Rick Measham
2011-03-18 01:29:03 UTC
Permalink
Try `apt-get install libtiff-tools` or whatever packaging system your
linux flavor uses.

Cheers!
Rick Measham
Post by aashish_shah
Thanks for your responses. I noticed that tiff2pdf is a separate utility which you need to purchase. Also found that its mostly for windows platform. Do you know if tiff2pdf is available for Linux platform ?
Ideally I would like to convert all the pages in tiff image to pdf programatically in Perl using some perl module rather than purchasing a utility to do the conversion. If you know of any other perl module
which can convert all the pages in tiff image to pdf, please let me know.
Thanks once again for your responses.
Post by Jeffrey Ratcliffe
Post by Rick
Post by aashish_shah
Can someone let me know how to create a pdf file by importing all
the images from a tiff (tagged image file format) file having
multiple pages. I tried with the image_tiff() api call from
PDF::API2 module but it is importing only the 1st page instead of
importing all the pages. Here's the sample program which I tried.
Back in 2003, I was faced with this problem, and had to "cut" the
tiff images into individual pages for importation into the PDF.
This is what I do in gscan2pdf. However, if you are just interested in
turning a multipage TIFF into PDF, then there is always tiff2pdf
Regards
Jeff
------------------------------------
Yahoo! Groups Links
aashish_shah
2011-03-22 23:17:24 UTC
Permalink
Thanks Rick. Installed libtiff-3.8.2-7.el5_6.6 package on the linux box and was able to use the tiff2pdf utility for converting the tiff file having multiple pages to pdf without any issues.
Post by Rick Measham
Try `apt-get install libtiff-tools` or whatever packaging system your
linux flavor uses.
Cheers!
Rick Measham
Post by aashish_shah
Thanks for your responses. I noticed that tiff2pdf is a separate utility which you need to purchase. Also found that its mostly for windows platform. Do you know if tiff2pdf is available for Linux platform ?
Ideally I would like to convert all the pages in tiff image to pdf programatically in Perl using some perl module rather than purchasing a utility to do the conversion. If you know of any other perl module
which can convert all the pages in tiff image to pdf, please let me know.
Thanks once again for your responses.
Post by Jeffrey Ratcliffe
Post by Rick
Post by aashish_shah
Can someone let me know how to create a pdf file by importing all
the images from a tiff (tagged image file format) file having
multiple pages. I tried with the image_tiff() api call from
PDF::API2 module but it is importing only the 1st page instead of
importing all the pages. Here's the sample program which I tried.
Back in 2003, I was faced with this problem, and had to "cut" the
tiff images into individual pages for importation into the PDF.
This is what I do in gscan2pdf. However, if you are just interested in
turning a multipage TIFF into PDF, then there is always tiff2pdf
Regards
Jeff
------------------------------------
Yahoo! Groups Links
Continue reading on narkive:
Loading...