Questions tagged [fpdf]

A PHP class which allows developers to generate PDF files with pure PHP instead of the PDFlib library.

Home page of FPDF

FPDF is a PHP class which allows developers to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

FPDF has other advantages: high level functions. Here is a list of its main features:

  • Choice of measure unit, page format and margins
  • Page header and footer management
  • Automatic page break
  • Automatic line break and text justification
  • Image support (JPEG, PNG and GIF)
  • Colors
  • Links
  • TrueType, Type1 and encoding support
  • Page compression

FPDF requires no extension (except zlib to activate compression and GD for GIF support). It works with PHP 4 and PHP 5

2301 questions
7
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,547
  • 20
  • 52
  • 70
7
votes
1 answer

TCPDF / FPDF - Page break issue

I'm trying to create a PDF file with a table of data.. But when a page break is met it jumps to a new page everytime a new multicell is added to the page at the break point level..!? I have tried to do exactly the same with TCPDF, but still the same…
clarkk
  • 27,151
  • 72
  • 200
  • 340
7
votes
3 answers

Displaying values in FPDF

This is my code for generating pdf using FPDF in php. I want to display the semester, bill month and the billyear in the PDF file. I dont want to display the values in the table. I want to display at the top of the page. How can i do this? Any…
Coolbreeze
  • 906
  • 2
  • 15
  • 34
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
  • 15,694
  • 44
  • 120
  • 182
7
votes
6 answers

How to Center Text in FPDF?

How can I have this generated text appear centered in the page. Generated = $_POST method ... so I don't know how long will the text in input be. I need to have a pre-determined center parameter somehow. Any ideas? Maybe like…
NORM
  • 235
  • 4
  • 7
  • 14
7
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
  • 235
  • 4
  • 7
  • 14
7
votes
4 answers

"Network failure" to download PDF generated with with PHP FPDF/FPDF2File class in Google Chrome

I have reports generated in PHP / FPDF / FPDF2File that are usually displayed in the browser window. Notice: The parameters are passed to the PHP that generates report POST. The file is being accessed exclusively via HTTPS with a valid…
Allan Andrade
  • 670
  • 10
  • 26
7
votes
1 answer

FPDF SetX and SetY call order bug?

It seems like the order of SetX() and SetY() does matter. As you can see, the second cell-box in the example is located at following coordinates: X:10.00125/Y:80. Actually it should be at x=80. Setting Y-coordinate first fixes the problem. Is it a…
Thorsten
  • 71
  • 1
  • 4
7
votes
3 answers

FPDF error "Unable to create output file"

I'm working with fpdf libray for providing pdf files. A part of my project consists of using this library to generate pdf files for consumers. We are working with a server test under "ovh". The arborescence of my space in "ovh" is : /www/betatest. A…
user2567806
  • 460
  • 3
  • 7
  • 17
7
votes
1 answer

pdftk fill_form utf8 problems

Possible Duplicate: Flatten FDF / XFDF forms to PDF in PHP with utf-8 characters I am using pdftk to fill template pdf with data from fdf. Data has correct utf-8 characters, but when I use fill_form, resulting pdf file has formating errors. (I…
mitric
  • 91
  • 1
  • 8
7
votes
1 answer

fpdf page break issue

I have this loop that prints 6 rows (multicell) for about 30 times. The issue is that when it reaches the bottom page it prints 2 or 3 rows from the multicell and on the next page it prints the other 3 rows. I want to make it print all 6 rows on the…
Claudiu Creanga
  • 8,031
  • 10
  • 71
  • 110
7
votes
1 answer

why can't I overlay text on the bottom part of the page using fpdfi?

Background: I'm developing an application that involves taking an existing pdf form and overlaying text on top of it. The pdf is version 1.3. I'm using the fpdfi class (written in php) that can be found…
starshine531
  • 601
  • 5
  • 19
6
votes
2 answers

Sending an email with a PDF Files attachment using PHP

Ok guys, this is my first thread, and I have searched online but with no luck. I'm doing an internship, and I'm working on a project that requires me to create a webpage that generates a pdf file when a user submits his/her information. As soon as a…
Paolo Scamardella
  • 245
  • 2
  • 6
  • 14
6
votes
4 answers

Print multipage PDF on different printer-trays

I am generating a PDF by PHP with FPDF. This works well. Now what I want: From a multipage PDF all pages expect the last one have to print with paper from tray1 and the last page from tray2. Now the Question: How is this possible? Is this a Acrobat…
scube
  • 1,931
  • 15
  • 21
6
votes
3 answers

FPDF Getting "Incorrect output destination" but the error code showing the correct destination

I'm trying to use FPDF and FPDI to edit a PDF and add text to it. I keep getting an "Incorrect output destination" error but the destination is the correct location that I want it to create a file in, why does FPDF not like my output destination?…
movac
  • 1,576
  • 3
  • 21
  • 45