strongbond/pdf-filler-laravel

There is no license information available for the latest version (1.0.2) of this package.

Using this pdf filler we can fill forms as well as add signature

1.0.2 2022-07-28 14:13 UTC

This package is auto-updated.

Last update: 2024-04-04 09:17:43 UTC


README

This packages helps you fill pdf as well as add signature ,using free linux tools.

Step 1 :

sudo apt-get install imagemagick

sudo apt-get install pdftk

sudo apt-get install poppler-utils

Step 2

comment the below line on /etc/ImageMagick-6/policy.xml

<policy domain="coder" rights="none" pattern="PS" />

<policy domain="coder" rights="none" pattern="PS2" />

<policy domain="coder" rights="none" pattern="PS3" />

<policy domain="coder" rights="none" pattern="EPS" />

<policy domain="coder" rights="none" pattern="PDF" />

<policy domain="coder" rights="none" pattern="XPS" />

Step - 4

php artisan vendor:publish

This will create a config file[pdffiller.pdf] in config folder.

Keep all the pdf to be filled inside the folder that you have specified in the config file. Cause the program will search in that folder for the pdf file that you will supply in the function.

The program bascially creates a sub folder [pdata] and keep all the modified pdf in that folder.

How to use ?

  $pdfObj = new PdfFiller();    
  $pdfObj->fill(['First Name' => 'John', 'License Period' => '2 Years',
'signatures' => [
    ["pg_no" => 2, "image_loc" => 'S3_URL', "bottom" => "300", "left" => "150"], 
    ["pg_no"=>  1, "image_base_64"=> "data:image/jpeg;base64 ..." ,"bottom"=>"102","left"=>"25"]
    
]], "doctor_melvin.pdf", "doctor_melvin_filled.pdf"));