Questions tagged [fpdi]

A PHP class which allows to read pages from existing PDF and generate new files based on FPDF.

Home page of FPDI

FPDI is a PHP class based on which allows to generate and manipulate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDI stands for Free: you may use it for any kind of usage and modify it to suit your needs.

327 questions
3
votes
3 answers

Can TCPDF / FPDI accept PDF as string?

Is it possible to feed TCPDF or FPDI PDFs as a string? I have an incoming array of PDFs as strings, and I can't write to disk. I wasn't able to find anything in the documentation about this. If not, is there an efficient way to store/read these PDFs…
jbrain
  • 561
  • 3
  • 7
  • 18
3
votes
0 answers

fpdi tcpdf layers level manage?

I editing existing pdf file using FPDI, and TCPDF libraries, by drawing a transparent rectangle. $pdf = new FPDI(); $pagecount = $pdf->setSourceFile('my.pdf'); $unserialized = unserialize($questionaire['cordinates']); for ($page_counter = 1;…
Marek D.
  • 51
  • 5
2
votes
1 answer

manipulate pdf form with fill-able form fields and keep them fillable by user?

I got a form with fill-able form fields made by Acrobat, it is rather complex. Via PHP I want to "simply" attach another page, add a barcode to the form page and add meta info. Currently I do not manage to retain the fields fill-able or tcpdf/fpdi…
2
votes
0 answers

Adding logo image on pdf file with fpdi class

I managed quite easily to add an image to a pdf file with fpdi class with the script below in Laravel environment. $pdf = new \setasign\Fpdi\Fpdi(); // set PDF file & get page count $pageCount =…
Paul Godard
  • 1,055
  • 1
  • 14
  • 30
2
votes
0 answers

merging 2 pdf with gofpdf

Did anyone work with pdf merger from gofpdi library? I am trying to merge 2 pdf as one file. I pass them as reedseeker. unc test(pdfm bytes.Buffer, m pdf.Maroto, pdf2 bytes.Buffer) { pdf := gofpdf.New("P", "mm", "A4", "") w, h :=…
2
votes
1 answer

How to write on existing pdf file in php

I know this question has been asked many times but I read all related answer and my problem is not solved yet. I can add text and image on a new blank pdf file by code below.
2
votes
1 answer

How to use FPDI SetSourceFile with a URL that redirects?

I've got a PDF file on my server, and I want to use it as parameter for this function: $fpdi->setSourceFile() The problem is that the link used as a source redirects to another URL and I don't know the final URL. It seems that setSourceFile needs…
kiks73
  • 3,718
  • 3
  • 25
  • 52
2
votes
1 answer

How to import downloaded blank pdf file using gofpdi.importPage() in Golang?

I am getting the panic form gofpdi.importPage() for blank pdf if download from anywhere once I create the blank pdf using gofpdf then It's working fine Code: pdf := gofpdf.New("P", "pt", "A4", "") // create a new Importer instance imp :=…
Karmdip joshi
  • 140
  • 2
  • 14
2
votes
1 answer

php edit interactive pdf form

I have an interactive pdf that has a few forms with input fields and checkboxes. I need to open this pdf with php and complete the fields. Is there a way to do that with php? If yes can anyone recommend a library, preferably free. PS: looked at…
user253530
  • 2,583
  • 13
  • 44
  • 61
2
votes
0 answers

How to use a pdf template using FPDI

I am recently working in a system that produces a pdf report through a pdf template. I found FPDI for this purpose. I tried the code below however, it keeps me giving this error... Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION…
2
votes
1 answer

Import a PDF and sign it with Symfony

I need to sign an existing pdf. I'm using Symfony 3.4.12 and the bundle https://packagist.org/packages/whiteoctober/tcpdf-bundle to sign pdf's. Inside the services I added this part: AppBundle\Controller\AController: class:…
2
votes
1 answer

Php Remove page from existing pdf file

What is the easiest way to remove one page (ie. the last page) from a local pdf file using php? I have around 100 files, and each one needs to have its last page dropped. Optimally, I want to replace the file with a file of the same name that is…
Jay Shri
  • 119
  • 3
  • 12
2
votes
1 answer

Trying to include setasign/fpdf via composer

I'm trying to include fpdf and fpdi via installing setasign/fpdi-fpdf through composer but I can't seem to get fpdf or fpdi loaded. The error I get is Class 'setasign\fpdf\FPDF' not found. use \setasign\fpdf\FPDF as FPDF; //inside controller…
Blakethepatton
  • 537
  • 6
  • 17
2
votes
1 answer

PHP - Class 'Fpdi' not found but the file defining it is included

Hello I'm using Fpdi class to add an Image on a pdf file (in PHP) (I downloaded code from github https://github.com/Setasign/FPDI) But when i try instantiate a new Fpdi, I get the error: Class 'Fpdi' not found at line $pdf = new Fpdi(); Here is my…
Faithium
  • 111
  • 1
  • 2
  • 11
2
votes
0 answers

FPDF, Fpdi unable to generate pdf

i am trying to get a hang of FPDI to combine PDFs. Been trying on the example codes given by setasign. FPDF - fpdf.php is from fpdf.org, v1.81 Fpdi - i took the src from setasign,…
NewProgrammer
  • 295
  • 1
  • 4
  • 21