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
4
votes
4 answers

TCPDF and FPDI with multiple pages

This looks like the simplest thing but I can't get it to work. I need to add text to the first page of a multi-page pdf (could be any number of pages) Using this code on a two page pdf (without the for loop, just using $pdf->importPage(2)) I end up…
PaulMrG
  • 1,822
  • 2
  • 16
  • 20
4
votes
1 answer

Why does fpdi crop the pdf page?

So, I'm using fpdi, version 1.2 to add some little mark to every page in my document. Here is my code: public static function markPdf($file, $text){ define('FPDF_FONTPATH','font/'); require_once('fpdi/fpdf.php'); …
aga
  • 27,954
  • 13
  • 86
  • 121
4
votes
5 answers

How to skip over corrupt files with PHP libraries TCPDF and FPDI by modifying error handling?

I am using the PHP libraries TCPDF and FPDI to combine PDF documents, and am getting the following error: TCPDF ERROR: Unable to find object (10, 0) at expected location I have the commercial version of FPDI. It appears that the issue is only…
Michael
  • 2,276
  • 15
  • 49
  • 80
3
votes
0 answers

PHP Downsizing or Converting PDF for Live Preview

Problem Currently working on creating a live PDF generation preview in Laravel PHP using using PDFI + TCPDF so that a user can import a base PDF and embed text on top of it PDF generation is working fine for all sizes, but large PDFs (e.g. A1 size)…
Ryan N.
  • 356
  • 4
  • 17
3
votes
1 answer

How to use setasign fpdi v2.0.0 in Laravel 5.2.* or higher?

I want to edit some pdf file with setasign fpdi, When it was fpdi still in version 1.6.* i use this way to use it : I install it via composer composer require setasign/fpdf & composer require setasign/fpdi And i use it in Laravel controller : $pdf…
Fradia
  • 33
  • 2
  • 6
3
votes
1 answer

FPDI insert html code on pdf file

I use FPDI and want to insert in pdf file some html code but the method WriteHTML() is only on FPDF and not in FPDI. How can I do it?
Rinos
  • 636
  • 2
  • 10
  • 25
3
votes
0 answers

Crop a section of a PDF page using FPDI

I am using FPDI-TCPDF to insert an already existing PDF to a PDF created by using TCPDF. Can I crop a section of already existing Page before inserting into the new PDF? I am using below code which insert the entire page (page number 2). But I want…
Alisa
  • 313
  • 5
  • 20
3
votes
1 answer

How to delete text from PDF using FPDI/ FPDF

I Want to edit PDF in php using FPDI/FPDF.I want to replace particular text.I have try many solution but they are not giving the desired result.All are writing some new text in new position. I want to search some text and replace that text with a…
Anand Singh
  • 2,343
  • 1
  • 22
  • 34
3
votes
1 answer

Add a Footer in FPDI

I've created a PDF generator thanks to FPDF, it uses data from a mysql database and works very well. Number of pages is variable. Then I wanted to add to every of this PDF some pages imported from other PDF files. Number of added page and adress of…
lauxile
  • 31
  • 1
  • 3
3
votes
1 answer

Adding images over PDF using FPDI and TCPDF

I'm trying to add images on top of an existing PDF. The pdf contains a blank grid, I am writing a script that will insert images on top of the PDF and output a new modified PDF file. I am using FPDI and TCPDF libraries to load and edit the PDF…
Wojtek Grabczak
  • 131
  • 1
  • 1
  • 6
3
votes
1 answer

Is TCPDF MultiCell maxheight parameter overriding the height parameter even if it wouldn't have to?

I updated my tcpdf lib and I am now facing this weird behaviour that apparently the maxheight parameter overrides the minimum height parameter, even if it the cell content is not that high. From the docs it says: $h: (float) Cell minimum height.…
Alex
  • 9,911
  • 5
  • 33
  • 52
3
votes
1 answer

Using TCPDF and FPDI with cake php

I have go TCPDF setup in my cake php install and am now trying to also use FPDI with it as i need to add a PDF to the start of the PDF that is being generated. WHen trying to do this i am using 3 classes XTCPDF which holds my header data FPDI -…
kwhohasamullet
  • 1,120
  • 5
  • 19
  • 27
3
votes
2 answers

Merging PDF files with PHP/FPDI

i am trying to merge two files using FPDI the error i get is:'TCPDF ERROR: File is encrypted!', however, the files are not encrypted, at least the files are printable, viewable etc and no password is required. i want to merge two…
pgee70
  • 3,707
  • 4
  • 35
  • 41
3
votes
1 answer

Watermarking a PDF with another PDF or HTML

Let's say I have stamp.pdf or stamp.html and original.pdf. stamp.pdf (stamp.html) contains a stamp and I want to place stamp.pdf over original.pdf in a certain position and generate a new pdf - original_stamped.pdf. I would like to insert stamp.pdf…
ihtus
  • 2,673
  • 13
  • 40
  • 58
3
votes
1 answer

What is the logic behind X and Y axis in PDF?

I'm updating a PDF dynamically using TCPDF and FPDI. Everything works properly there. However, I cannot understand the way SetXY() works. What are exactly the X and Y axis values? Milimeters? Letter spacing from the edge? Thanks!
Aram Boyajyan
  • 834
  • 2
  • 13
  • 31
1 2
3
21 22