fpdf - FPDFI Error with multiple page PDF when downloading and opening -
so i'm creating multiple page pdf fpdi , i've encountered problem when downloading , opening pdf creates. displays , prints fine when viewing in chrome or firefox via built in plug-ins. in adobe reader or in ie shows error "there problem on page" when scroll downwards pages.
i'm using fpdi set source file , weird thing displays fine. in illustration have 55 pages. shows 55 pages source file set first page has text have set pdf. rest of pages source file. i'm guessing missing adobe reader doesn't i'm not sure exactly!
require_once('/data/functions/pdfs/fpdf/fpdf.php'); require_once('/data/functions/pdfs/fpdi/fpdi.php'); require_once('rotate.php'); $pdf=new pdf(); $pagecount = $pdf->setsourcefile('eibtm14_exhibitor_badge.pdf'); for($i = 0; $i < $num_badges; $i++) { //create page $thepage = $pdf->importpage(1, '/mediabox'); $pdf->addpage(); $pdf->usetemplate($thepage,0,0,0,false); //content of each page $pdf->setxy(141,197); $pdf->rotate(90); $pdf->setfont('arial','',fontsize($company)); $pdf->cell(-100,13,mb_strtoupper($company),$borders,1,"c"); }
i've not attached code because content i've added pretty much same block of code outputting different field each time. think problem lies in create page section i'm not quite sure! did seek setting importpage(1 importpage($+1 gives me fpdf error pagenumber wrong
thanks time , help in advance jack
doh! i've managed time , turns out rotation breaking it. needed reset rotation 0 before adding new page i.e.
$pdf->rotate(0); $pdf->addpage();
thanks help on needed time break piece piece see causing error.
fpdf fpdi
No comments:
Post a Comment