Page 1 of 1

Tiff To PDF Conversion

Posted: 2011-01-17T08:08:13-07:00
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

Re: Tiff To PDF Conversion

Posted: 2011-01-18T13:15:27-07:00
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

Re: Tiff To PDF Conversion

Posted: 2011-01-18T21:52:46-07:00
by raju.balasundar
Thanks Dulfer...