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
2
votes
1 answer

FPDF/FPDI UseTemplate

I'm using FPDI & FPDF to overlay new text on top of an existing PDF. It uses the useTemplate() method to achieve this. Problem I'm having - it only applies the template to the first page. If the text is long, it will wrap to a second page, using the…
Matt Fletcher
  • 345
  • 3
  • 15
2
votes
3 answers

FPDF, FPDI - using fonts embedded in the source document

I am using FPDF / FPDI to build a PDF templating system. One PDF is used as the background and has a number of editable regions defined within it (stored in database). An editable region could be an image, a text, or both, however this is not my…
Gavin
1
vote
0 answers

Keeping form fields after FPDF/FPDI generation

I've scoured the forums/web for this answer, but I've failed to come up with a solution. I have a PHP based form that inputs form data onto a PDF generated by FPDF/FPDI (utilizing a pre-made template). That, in and of itself, is working just fine. I…
1
vote
2 answers

How to get text position in PDF using PHP, TCPDF & FPDI?

I have an issue: I need to upload some PDF template with data and then change it. For example, in PDF file is string: NAME: I need get position of this string and insert some text (username etc.) after it. Is it possible ? Update The PDF isn't…
user959436
  • 13
  • 1
  • 3
1
vote
1 answer

Debugging FPDF invalid call after upgrading laravel and PHP8

I have a web app that used FPDI to create pdf files, using laravel 5.7, setasign/fpdi-fpdf ^2.0 and PHP 7.4. I recently upgraded to laravel 9 (also upgrading respective dependencies) and because the meta package was depcrecated, I now use…
Wolfie
  • 31
  • 11
1
vote
0 answers

Fill to position using FPDF/MPDF

I am importing a PDF that is required to fill name and email id as such. Problem is currently I am manually positioning it with X and Y axis. How do I avoid this and get the exact position from the PDF? Is there an easier way?
Vika
  • 419
  • 1
  • 13
1
vote
1 answer

Search pdf and extract page when found

Does anyone know how to search through a multiple page pdf for some text (e.g., an invoice number) and then extract that page to a separate file? I see how I can use FPDI to extract a particular page and then use FPDF to modify and save. The part I…
adamkrell
  • 258
  • 1
  • 2
  • 11
1
vote
0 answers

Setassign PDF in Laravel Vapor Amazon Lambda

I'm trying to import a PDF from storage to print values using FPDF and FPDI to download the PDF with the values. My function works perfectly on my local system but fails to open on my staging environment hosted on AWS Lambda. If anyone could assist,…
1
vote
0 answers

Stretching image in a pdf using writeHTMLCell()

I am using FPDI library to convert from html to pdf. I need to stretch images to bigger then original size and it seems to me they will not go a pixel bigger. I can stretch them down but not up. I am using the function writeHTMLCell and passing it a…
Iznogood
  • 12,447
  • 3
  • 26
  • 44
1
vote
2 answers

using TCPDF and FPDI together

I have a doubt about using TCPDF and FPDI together. I am working on a project where I need to modify existing PDF file and generate new PDF, actually existing PDF are Greeting card template and I have to print certain data at certain pages (such as…
Ravish
  • 2,383
  • 4
  • 37
  • 55
1
vote
1 answer

How to add a external pdf file as an additional page to TCPF via FPDI

I'm using TCPDF to create PDF files from php files. Works all fine. Now I want to add an additional page using an existing .pdf file from the server. Best method to do so is using FPDI afaik. But I can't find any Docu or working example on how to…
Oliver
  • 156
  • 1
  • 13
1
vote
1 answer

Declaration of setasign\Fpdi\FpdfTplTrait::setPageFormat(array $size, string $orientation) Laravel 5.4 and php 7

Getting below declaration error on installing fpdf and fpdi package Declaration of setasign\Fpdi\FpdfTplTrait::setPageFormat(array $size, string $orientation)
Prabu DT
  • 11
  • 1
1
vote
0 answers

Adding cells to existing PDF via FPDI class

I am trying to add a cell to an existing PDF, but unfortunately the document is a scan, which interprets it as one layer - a photo - I think so. When adding a cell to such a file, I only have borderless text and no cell fill color on the visible…
LordF
  • 407
  • 5
  • 18
1
vote
0 answers

Resize PDF file with TCPDF and FPDI

im using TCPDF and FPDI to import existing pdf file and write text on it. i want to resize the pdf file to A4 properties W:595.2 H:8870.89 the reason i want to change the size, is because i want to place text with position that matches the page's…
1
vote
1 answer

How to use class_exists correctly in PHP 5.4

I'm using an old system with PHP 5.4 that I can't upgrade. I had to make a small change by adding a library for PDF file generation called FPDF/FPDI that has this function: protected function getPdfParserInstance(StreamReader $streamReader) { …
Ivan
  • 14,692
  • 17
  • 59
  • 96