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
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
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,550
  • 3
  • 35
  • 51
5
votes
1 answer

PHP: How to combine these two classes?

Just like the title says I am having problems combining two classes. Altough this is about FPDF, i do think this is a regular question, since the question could have been about any script. I am using FPDF to create PDF-documents on the fly. I use it…
mat
  • 1,619
  • 1
  • 15
  • 25
5
votes
4 answers

FPDF - Can it handle original PDF with mixed orientations (portrait/landscape)?

I am using the FPDF() method (from FPDI_Protection.php) to import existing PDFs and apply password protection. The problem I'm having is that the original PDF has a mix of portrait and landscape pages (8.5"X11" & 11"X8.5"), whereas the import…
James Huckabone
  • 615
  • 1
  • 12
  • 32
5
votes
3 answers

FPDI/FPDF: Watermark and Print Multiple Pages

I modified this stack question: Applying watermarks on pdf files when users try to download the files but I encountered an error, though there was a comment that says on how to fix it, it wasn't elaborate enough. Here is the code:…
Mr A
  • 1,345
  • 4
  • 22
  • 51
4
votes
2 answers

FPDF image under layout

I import a PDF file with 2 pages using fpdi, it works. I need to insert an image in my imported pdf but its in under the original pdf layout so I cant see the image that i want to insert. By the way, I can add text and it works properly. I do the…
Otto
  • 4,020
  • 6
  • 35
  • 46
4
votes
1 answer

Can't edit a existing PDF file with FPDI

I am trying to learn how to edit a PDF file with FPDF and FPDI using PHP language. I have this sample PDF file where I want to insert some values. If I were to create a PDF file using FPDF, everything works fine. But if I try to edit an existing…
NewGuy
  • 73
  • 1
  • 7
4
votes
3 answers

FPDF/FPDI: How to vertically align a cell or multi-cell?

I'm starting to think is not possible? (out of the box/default class) I am using FPDF/FPDI PHP class to generate a .pdf In this situation, I have some text that can be short, or be long (no telling) So I set a width on my cell.. and change from…
whispers
  • 962
  • 1
  • 22
  • 48
4
votes
2 answers

Given stream is not seekable In FPDI

I am using FPDI library to merge multiple pdf files into one, followed this documentaion https://manuals.setasign.com/fpdi-manual/v2/the-fpdi-class/ I have tried like below, use \setasign\Fpdi\Fpdi; use…
Manjunath C
  • 65
  • 1
  • 7
4
votes
0 answers

Generate barcode code128 with fpdi don't get read when printed at 203 dpi

I generate a barcode with fpdi and php: use setasign\Fpdi\Fpdi; require ('fpdf181/fpdf.php'); require ('FPDI203/src/autoload.php'); $pdf = new Fpdi('L','mm',array(106.36,25.9)); $titulo1 = "Image Processor"; $titulo2 =…
MRlinux
  • 59
  • 7
4
votes
1 answer

TCPDF integrated by Composer seems not to load

I'm stuck with an error that is apparently caused by TCPDF not being included by Composer mechanism. Here's the situation: Fatal error: Class 'FPDF' not found in /var/www/r0byn/web/vendor/setasign/fpdi/fpdi_bridge.php on line 24 Line 24: if…
R0byn
  • 363
  • 5
  • 15
4
votes
1 answer

How can I set the size of a PDF page with FPDI

I'm stuck at work. I'm coding in PHP and I have to generate a PDF. My problem is that I have to create cards (same size of credit card 85.6*54mm), I'm using a template at the right size, but the page is still generated with A4 format. I can see my…
4
votes
1 answer

TCPDF ERROR: Unable to find object (8, 0) at expected location

I am getting an error while deleting a page from an scanned pdf using TCPDF & FPDI. Other pdf are working fine. ERROR: Unable to find object (8, 0) at expected location
shabeer
  • 1,064
  • 9
  • 17
4
votes
3 answers

"Unable to find xref table" with Dompdf0.6a + FPDI

I'm trying to generate a pdf file from html using dompdf0.6a and that works fine, but then i need to encrypt it for protection, but i get error FPDF error: Unable to find xref table - Maybe a Problem with 'auto_detect_line_endings' However if I use…
Artjom Kurapov
  • 6,115
  • 4
  • 32
  • 42
4
votes
1 answer

Trying to use FPDI with TCPDF using Symfony2

I'm trying to use FPDI with TCPDF in symfony2. I could use TCPDF alone without any problems. But when I try to use FPDI, I'm getting errors. In my composer.json i put the following: "autoload": { "psr-0": { "": "src/" }, …
Esteban Filardi
  • 726
  • 3
  • 16
  • 30
1
2
3
21 22