I am trying to convert a large jpeg around (1200 x 100) to a PDF document.
I currently am using FPDF and am using this following code:
<?php
require('fpdf.php');
$pdf =& new FPDF('p','pt','a4');
$pdf->AddPage();
$pdf->Image("photo.jpg");
$pdf->Output("photo.pdf",'F');
?>
The PDF is created fine, but the image gets cut off and doesn’t display all of it.
By default, FPDF inserts images at 72dpi unless you specify otherwise, in which case your image comes out at 16.7 x 1.4 inches, which exceeds the page size.