View Single Post
  #18 (permalink)  
Old 03-01-10, 07:14 PM
adrianbj adrianbj is offline
Newbie Coder
 
Join Date: Feb 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
imagemagick really did end up being too slow on PDFs with hundreds of pages, so I have FPDI a go and it seems quick and accurate so far. I used it with tcpdf since I am already using that, rather than FPDF, which is the default. Don't forget that you will also need FPDF_TPL. You can get both from here:
http://www.setasign.de/products/pdf-.../fpdi/fpdi.php

require_once('../../tcpdf/tcpdf.php');
require_once('../../fpdi/fpdi.php');

$pdf =& new FPDI();

$pagecount = $pdf->setSourceFile($filepath);
return $pagecount;
Reply With Quote