I want to convert image TIFF file to PDF file. It's multi-page image files.
I write this program :
my $p = PDF_new();
die "Couldn't open PDF file" if (PDF_open_file($p, "pdfprint.pdf") == -1);
PDF_set_info($p, "Creator", "pdfprint.pl");
PDF_set_info($p, "Author", "AFNOR");
PDF_set_info($p, "Title", "Norme AFNOR");
$num = 'FA001739';
my $imagefile = "/DOC/genie/stockage/$num/DOCUMENT/TIFF_600/$num\.TIF";
IMAGE: for ($frame=1;$frame<101;$frame++) {
$image =PDF_open_image_file($p,"tiff",$imagefile,"page",$frame);
last IMAGE if ($image ==-1);
# D�finition des dimensions de l'image
$width = PDF_get_value($p, "imagewidth", $image);
$height = PDF_get_value($p, "imageheight", $image);
PDF_begin_page($p, $width, $height);
PDF_place_image($p, $image, 0, 0, 1);
PDF_close_image($p, $image);
PDF_end_page($p);
}
The program creates the PDF file with all pages but it doesn't success to open these
pages : error of reading.
Vincent Maugain.
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users