Tiff To PDF Conversion

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
raju.balasundar
Posts: 5
Joined: 2011-01-17T07:52:16-07:00
Authentication code: 8675308

Tiff To PDF Conversion

Post by raju.balasundar »

Hi,
I have converted tif to pdf. if the tiff have smaller resolution(864*1188) then the conversion made success. but for larger resolution(1728*2376) it doesn't convert. please advice.

>>>Sample high resolution image link
http://www.fileformat.info/format/tiff/ ... d/download
php code
$document = new Imagick($Saveloc); /// Saveloc - Tiff File Location, PdfFile- New PDF File Name
$document->setImageFormat("pdf");
$document->writeImages($PdfFile, true);
//exec("usr/bin/convert $Saveloc $PdfFile");

thanks a lot in advance.

Regards,
Raju.B
Dulfer
Posts: 7
Joined: 2011-01-06T00:43:25-07:00
Authentication code: 8675308

Re: Tiff To PDF Conversion

Post by Dulfer »

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

echo 'getVersion: ';
var_dump (Imagick::getVersion());

echo ' <br />';

$Saveloc = 'G31D.TIF';
$PdfFile =  'G31D.pdf';
$document = new Imagick($Saveloc); /// Saveloc - Tiff File Location, PdfFile- New PDF File Name
$document->setImageFormat("pdf");

echo 'memory_get_peak_usage =' .memory_get_peak_usage().'<br />';

$document->writeImages($PdfFile, true);
//exec("usr/bin/convert $Saveloc $PdfFile");
It is work.
G31D.TIF - 2464*3248
raju.balasundar
Posts: 5
Joined: 2011-01-17T07:52:16-07:00
Authentication code: 8675308

Re: Tiff To PDF Conversion

Post by raju.balasundar »

Thanks Dulfer...
Post Reply