PDFLib or PDF::API2
Date: 18 Apr 2004 22:24:30 -0700
Group,
Basically I wanted to open a new pdf page and place TIFF, JPG and EPS
images. I am trying PDF::API2 but I am getting "Insufficient data for
an image" error when I try to open the PDF using 5.0.1. This error is
for TIFF and EPS images. For JPEG I am not getting any error but image
is enlarged.
Should I try PDFlib for this purpose. Sample code using PDF::API2
====
use PDF::API2;
unlink "test.pdf";
$pdf = PDF::API2->new(-file=>"test.pdf");
$page = $pdf->page(1);
$gfx = $page->gfx;
$img = $pdf->image_tiff("bbb.tif");
#$img = $pdf->image_jpeg("ccc.jpg");
$gfx->image($img, 0, 0);
$page->update;
$pdf->update;
exit;
=====
REgards
Dominic
Relevant Pages
- Re: Scanner advice
... It's not necessarily that changing from tiff to pdf increases your ... upon the threshold you setup, automatically OCR the images, properly ... The ScanSnap is not a twain or isis compliant scanner so that's the one ... (comp.periphs.scanners) - Re: colormanagement with ghostscript ?
... PostScript or PDF input) then it does indeed support PostScript level2/3 ... PS file to gs still resulted in visibly better printed images, ... %%% Establish an Adobe RGB compatibe color space as Default RGB ... (comp.lang.postscript) - Re: Scanner advice
... There are several "scan to pdf" scanners on the market. ... The actual image is almost always a JPEG rather than TIFF, and you want JPEG rather than TIFF anyway. ... But since it ends up within a PDF file, it's irrelevant (Adobe Acrobat will allow you to extract the imbedded images from a PDF file if desired or necessary). ... (comp.periphs.scanners) - Re: Can I compress GIF files the same way I do JPG files ?
... Can I compress GIF files the same way I do JPG files? ... It can combine a series of images into a single multipage ps, pdf, tiff, ... These days a lot of scanners have the ... (comp.unix.sco.misc) - Re: Horrible Image Quality When Saving as PDF
... Your mention of the Zoom level may be relevant. ... I usually work in Word at 100%, but I have Acrobat and Adobe Reader set to display "Full Page." ... Some images still look terrible in PDFs but print perfectly fine; I don't know why they look better in Word. ... option checked) the images in the PDF look to the naked eye exactly the same as they do in the document at the same zoom level. ... (microsoft.public.word.docmanagement) |
|