PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of José Quijado   PDF Data Injection   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PDF Data Injection
Generate document from PDF form with input values
Author: By
Last change:
Date: 3 months ago
Size: 587 bytes
 

Contents

Class file image Download
<?php
   
include ('includes/pdf_data_injection.class.php');
   
$objPDF = new PDFDataInjection();
   
$objPDF->setSourcePath('./origen/');
   
$objPDF->setTempPath('./temp/');
   
$objPDF->setDestinationPath('./dest/');
   
$objPDF->setPDF('formulario.pdf');
   
$datos = [
       
'campo_edad' => '2',
       
'campo_comunitario' => 'comunitario',
       
'campo_ciudad' => 'Madrid',
    ];
   
$objPDF->setFormData($datos);

   
$objPDF->createFDF();

   
$objPDF->insertData();

   
$objPDF->injectDataInPDF();

   
$FinalPDFName = $objPDF->getFinalPDFName();