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

Decrypt an encrypted pdf using MPDF

Is there any way to decrypt a pdf using MPDF library (PHP)? I am receiving a pdf from 3rd party and they are using FPDI to encrypt it. I am using MPDF to make it password protected. It's easy to make a password protected pdf when it's not encrypted…
Danyal Sandeelo
  • 12,196
  • 10
  • 47
  • 78
0
votes
2 answers

Laravel : Call to undefined method setasign\Fpdi\Fpdi::GetPageWidth() using Fpdi

I have a template located at "public/form/file.pdf" and what to get the page height and the page width but I'm encountering error "Call to undefined method setasign\Fpdi\Fpdi::GetPageWidth()" I installed via composer of the following…
Angel
  • 966
  • 4
  • 25
  • 60
0
votes
0 answers

How to find the correct font ttf for the FPDI/FPDF Japanese Character in Laravel

I am using FPDI/FPDF Library for my Laravel PDF export. I am having problem with Japanese Font it turns into like this: ヒルデモア㕟㕾プラーザ・ビレッジⅢ it should be like this: 派遣先責任者署名䠄代理者も含む䠅 I tried a lot of fonts and still…
GDP
  • 1
  • 1
  • 5
0
votes
1 answer

How to Add own Font (Japanese font) in FPDI Library?

Here is an example. How can I add the font that I downloaded. How is the process? $pdf = new FPDI(); $pdf->AddPage(); $pdf->setSourceFile('sample source of the template.pdf'); $tplIdx = $pdf->importPage(1); $pdf->useTemplate($tplIdx, 0, 0,…
GDP
  • 1
  • 1
  • 5
0
votes
1 answer

Laravel import PDF with editable fields and fill same fields with data

I am trying to import a certain PDF file that has editable fields, fill it with data from my database and then download it and keep those fields editable again when accessing that pdf file. Can somebody help me with first steps of how I should…
Sallmin Rexha
  • 125
  • 1
  • 11
0
votes
1 answer

FPDF cell places text somewhere

I have read already a lot of cases here but nothing of the suggested solutions worked for me so therefore I am asking for some hints/help. I use FPDI/FPDF with a method to place text in cells, in short it is: public function placeTextCell($font,…
JohnA
  • 53
  • 1
  • 8
0
votes
1 answer

Double signature on pdf already signed

I have this script which already sign a PDF
AtarC5
  • 393
  • 2
  • 11
  • 27
0
votes
0 answers

Failed to Display PDF BLOB and write text watermark using FPDF

I am using FPDF/FPDI to merge a PDF from database with an image as a header of the PDF. Searching for solution but no solution found yet so I post it here. Here is my viewpdf.php…
0
votes
1 answer

how to add images to multiple pages on pdf and download the full pdf

I started to work with fpdi with fpdf and I try to add more than one image to multiple pages and in the end, I want to download one PDF with the images over the PDF pages. The problem is that always just the last PDF downloaded with the last page.…
Baruch Mashasha
  • 951
  • 1
  • 11
  • 29
0
votes
1 answer

PHP Mysql - How to control white space after every number

I have this code below, How would I do it if I want to control the spacing between the numbers. 1 0 , 5 6 5 , 6 6 0 . 8 8 ( currently 1 white space ) - This is the current output, I want more spaces between every numbers maybe 3 or more white…
dan
  • 29
  • 5
0
votes
1 answer

composer install when Installing setasign/fpdi_pdf-parser

What Username and password need to fill in when process Installing setasign/fpdi_pdf-parser? Thank You I did process my composer install, but when until Installing setasign/fpdi_pdf-parser, then it stop installing and request me fill me Username &…
newLearner
  • 45
  • 1
  • 7
0
votes
1 answer

Add pages to PDF using FPDF if pagecount is not divisible by 4

Im trying to print some fpdf generated PDFs but if the page total is odd or not divisible by 4 then printing to a booklet is causing me some issues eg total pages = 73 printing to a booklet on A3 paper needs 4 pages per A3 sheet If i use this…
0
votes
2 answers

TCPDI useTemplate excedes timeout with somes pdf

I'm triying to put a text into some pdfs with TCPDI. It works fine in most pdfs, but in some pdf the code get stuck when it reachs the useTemplate() function, and got 500 error (Maximum time exceded). They are not long pdf (1,2,3 pages max), and…
0
votes
0 answers

Generate New PDF which uses existing PDF as a background template in LARAVEL using FPDF & FPDI packages

I am working in LARAVEL 6.8. I worknig on to generate New PDF which uses existing PDF as a background template. I have tried FPDF & FPDI packages but I couldn't find a way to add data in it. Below is the code which I have tried but this simple code…
always-a-learner
  • 3,671
  • 10
  • 41
  • 81
0
votes
1 answer

FPDF fails to load PDF document with sql connection

I have problems with connecting to database within fpdf.php code. The code works without sql connection include("db_connection.php"). My database connection (works): session_start(); ini_set('display_errors', true); $hostname =…
vidooo
  • 135
  • 1
  • 1
  • 9