2

I'm new in this FPDI so bear with me please. I followed every instruction I saw over the documentation of the FPDI but to no avail. I'm trying to populate a form (its a government form) so I can pay may responsibilities in a faster manner instead of typing or writing over and over again.

Here's my index.php

<?php

 require_once('fpdf.php');
 require_once('fpdi.php');

 // initiate FPDI
 $pdf = new FPDI();
 // add a page
 $pdf->AddPage();
 // set the source file
  $pdf->setSourceFile('ftp://ftp.bir.gov.ph/webadmin1/pdf/16992316.pdf');
 // import page 1
 $tplIdx = $pdf->importPage(1);

  // use the imported page and place it at position 10,10 with a width of 100 mm
  $pdf->useTemplate($tplIdx, 10, 10, 100);

  // now write some text above the imported page
   $pdf->SetFont('Helvetica');
  $pdf->SetTextColor(255, 0, 0);
 $pdf->SetXY(30, 30);
 $pdf->Write(0, 'This is just a simple text');

 $pdf->Output('your file name', 'D');

But when I ran the file, it outputs nothing. It shows nothing at all.

Thanks for the help.

Here's the downloaded FPDI

Hima
  • 1,249
  • 1
  • 14
  • 18
Pro_Newbie
  • 118
  • 12
  • Enable your error reporting: `error_reporting(E_ALL);ini_set('display_errors', 1);` to get a meaningful error message. You also should use a local file path instead of FTP! – Jan Slabon Jan 31 '17 at 16:56

0 Answers0