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.

302 questions
41
votes
8 answers

How to edit or write on existing PDF with Ruby?

I have a couple of PDF template files with complex content and several blank regions/areas in them. I need to be able to write text in those blank regions and save the resulting PDFs in a folder. I googled for answers on this question quite…
Alex Kovshovik
  • 3,735
  • 4
  • 31
  • 36
26
votes
0 answers

How to set encoding in PHP FPDI library

How to set UTF-8 encoding in php library named FPDI? Here's library: https://www.setasign.com/products/fpdi/manual/ The code: $pdf = new Fpdi(); $pdf->AddPage(); $pdf->setSourceFile('PdfDocument.pdf'); $tplIdx = $pdf->importPage(1); …
Adam Kozlowski
  • 3,978
  • 1
  • 23
  • 38
26
votes
8 answers

FPDF error: This document (testcopy.pdf) probably uses a compression technique which is not supported by the free parser shipped with FPDI

I am running the following code and giving me this error : FPDF error: This document (testcopy.pdf) probably uses a compression technique which is not supported by the free parser shipped with FPDI. I used another pdf named test.pdf and that works…
user851939
13
votes
7 answers

Is there a way to make FPDF/FPDI or Zend_Pdf support the parsing of PDFs greater than 1.4?

I am trying to add an existing PDF (created otherwise) to a PDF created with FPDF using FPDI. It seems to work find for most PDFs, but I get the following error: FPDF error: Unable to find xref table. After some testing, I figured out that if I use…
Darryl Hein
  • 134,677
  • 87
  • 206
  • 257
12
votes
1 answer

PDFMerger with FPDI-PDF-PARSER

FPDI PDF Files merger is being used. However, I ran into the following issue while trying to merge PDF files versions 1.5 and higher. The following was the error I received: This document (doc.pdf) probably uses a compression technique which is …
hello_its_me
  • 712
  • 18
  • 48
12
votes
2 answers

Can FPDF/FPDI use a PDF in landscape format as a template?

I am trying to import an existing PDF as a template with FPDI. The template is in landscape format. If I import the template into a new document the template page is inserted in portrait form with the content rotated 90 degrees. If my new…
Jim OHalloran
  • 5,709
  • 2
  • 34
  • 54
12
votes
3 answers

FPDI merge PDF files, strange line appears

I have to merge PDF files when a user needs to. The files are already existing and everything is fine. I'm using the fallowing code to merge the files: class concat_pdf extends FPDI { var $files = array(); function setFiles($files) { …
Nikoloff
  • 3,426
  • 1
  • 15
  • 18
11
votes
3 answers

Problem with size of the imported PDF template with FPDI+TCPDF

I am stuck in a very complex situation. I am working on a PHP Web apps for Greeting card. For this, I am using some Linux tools and TCPDF and FPDI. Let me tell you how it all works: there is 4 page greeting card template PDF file. this is custom…
Ravish
  • 2,173
  • 4
  • 33
  • 51
9
votes
2 answers

Preserve internal links using FPDI

I'm trying to dynamically add some text to an existing pdf file. I've tried both FPDF and TCPDF combined with FPDI to import the existing pdf. That's ok. But, as expected, all existing links from the original pdf are gone. Then, I tried to…
7
votes
2 answers

How to get the exact modified PDF using FPDF/FPDI?

i have a task to modify the PDF and add an image into it, for which I Have used the FPDF and FPDI libraries.. whose action code is given below: AddPage(); //Set…
OM The Eternity
  • 14,004
  • 37
  • 114
  • 174
6
votes
4 answers

wrong symbol exported in fpdf... ñ as ñ ..?

I dont know whats the problem but whenever I call the letter ñ from $_POST function it puts it in my fpdf as ñ .. any idea why?
NORM
  • 215
  • 4
  • 7
  • 14
6
votes
1 answer

PHP and FPDI/FPDF: Fatal error: Uncaught Exception: FPDF error: Incorrect output destination

I have a PDF file, and I want to add a new page with FPDI/FPDF Fatal error: Uncaught Exception: FPDF error: Incorrect output destination: outfiles/111111.pdf in C:\wamp\www\pdf\fpdi\fpdf.php on line 271 ( ! ) Exception: FPDF error: Incorrect…
user3282262
  • 75
  • 1
  • 4
6
votes
5 answers

FPDI with Multiple Pages

I am new to PHP and am having a bit of a hard time with using FPDI when it comes to inserting multiple pages. I have a .pdf file which consists of 3 pages. I ended up saving page 1 as a separate page out of the 3 and that worked with my code, but…
hiter202
  • 59
  • 1
  • 1
  • 5
6
votes
3 answers

FPDF / FPDI addPage() Orientation

I'm using the following code to add a new page to my existing PDF document and save it. require('addons/fpdf.php'); require('addons/fpdi.php'); $pdf = new FPDI(); $pagecount = $pdf->setSourceFile($orgpdfpath); for($i = 1; $i…
mmackh
  • 3,470
  • 3
  • 33
  • 50
5
votes
2 answers

Insert images files in existing PDF file using PHP

My need is that I upload two image files and that should be added to an existing PDF file. I have read about FPDF, basing on that I have followed this post link. In case if somebody can post a simple working example/link it would be helpful for…
125369
  • 3,257
  • 19
  • 48
  • 69
1
2 3
20 21