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

Array $txt[$y] loses special characters

I have to encode this $txt[$y] bellow to utf-8 or ISO-8859-1. I use tFPDF extend with font with have special letters. Right now string is correctly displayed in the cell, but when I use special letters like ś,й,é I can see only question…
volker
  • 13
  • 3
0
votes
0 answers

Center Watermark (fpd fpdi)

Registered users of my site can download some pdf's. I make use of the fpdf and fpdi class to add a watermark with their name to the pdf. Works fine, but the watermark is positioned on left/bottom corner. How can I center the watermark on the…
0
votes
1 answer

How to display values in tamil font in FPDF

How to display values in tamil font in FPDF? I have use this way, but not displayed. $this->AddFont('TSCu_SaiIndira','','TSCu_SaiIndira.php'); $fontName =…
Gowtham B
  • 3
  • 1
  • 8
0
votes
0 answers

Trying in FPDF To Do a Page Break When the Field Changes Value

I am using FPDF to tell teachers about over due books. The output displays a department, book number and last name. How can I force a page break when the department name changes. The Problem: I need to access Department and do a test to see if…
0
votes
1 answer

ANDROID : Intent to fpdf in browser downloads php file instead of pdf generated

Good day! I have a function in my mobile application which in a click of a button makes an intent of : Intent I = new Intent(Intent.ACTION_VIEW); I.setData(Uri.parse(URL)); …
RFA
  • 771
  • 1
  • 5
  • 14
0
votes
0 answers

Warning: getimagesize(images/IMG_20181017_115937.jpg): failed to open stream: No such file or directory in C:\wamp64\www\...\FPDF\fpdf.php

I have an error in my code. I'm uploading multiple images using an HTML/PHP forum. But when I want them to show in my FPDF I get this error: Warning: getimagesize(images/IMG_20181017_115937.jpg): failed to open stream: No such file or directory in…
Rob
  • 13
  • 5
0
votes
1 answer

Download a file in a specific directory using FPDF

I made a little form and I want it to save it as PDF. I managed to set up everything using FPDP but I'd like to download the file on a specific directory (let's say a folder) as soon as I hit the save button. This is my code for FPDF …
TheNoobUser
  • 406
  • 1
  • 5
  • 17
0
votes
0 answers

Multiple images at one page in FPDF

I'm working on an FPDF project. I've made an HTML/PHP form where you can upload multiple images... now I want them to show in my FPDF. This is the code that I've now: $pdf->AddPage(); $query1 = "SELECT filename FROM `file_upload` WHERE ncrnummer…
Rob
  • 13
  • 5
0
votes
1 answer

Array($row['image']) not available in $pdf->image

I have a small question..... I'm making an FPDF now I want to add an image but how can I get the name of the image from my DB....? The code is crashing on the $row['image'] in $pdf->image so i need a $row without this ['image']. At his moment $row…
Rob
  • 176
  • 1
  • 14
0
votes
2 answers

FPDF image not displaying

I tried to put an image in my pdf document, but when I use that method it only loading for a while, and do nothing (no errors, or such things) only a grey site... $pdf = new FPDF(); $pdf->AddPage(); $pdf->Image('logo.png'); $pdf->Output(); So what…
Nicolas
  • 269
  • 4
  • 14
0
votes
0 answers

Protecting / Hiding the embedded JavaScript in a PDF

Short version: is there a way to protect or hide the embedded JS from any user of the PDF, regardless of how they are opening it, and ideally without needing to use Adobe Pro (or a paid PDF tool) to do it? Background: I am creating a PDF containing…
pcbulldozer
  • 217
  • 1
  • 10
0
votes
1 answer

How to wrap text on multiple column using FPDF in php ?

I have a question in FPDF using Php. What I have in my code right now is column 1 will always follow the height of column 2 like below based on character length. The problem is only column 2 is working. When I try to increase the character length…
Rzj Hayabusa
  • 657
  • 2
  • 11
  • 29
0
votes
0 answers

How to get rid of 'dbObject' not found in fpdf?

I've tried a lot of things to solve this problem but, it's difficult to create a pdf using fpdf framework as a beginner. Here is my php codes. //generate_pdf.php
John Mark
  • 57
  • 8
0
votes
1 answer

Wordpress Database connection from FPDF

I'm using a tuto to build a little plugin to print result from a database into pdf. I used FPDF library to do it. Now I juste want to print the user name into my pdf. But it seems not working for me... Here is the problem : "Uncaught Error: Call to…
0
votes
1 answer

Splitted pdf files are as large as the original pdf

I have a 150Mb pdf (55 pages, containing text and images) generated with FPDF. I would like to split this PDF into single pages PDF. I use FPDI, but I have a major issue, each single page PDF is 150Mb (juste like the original pdf). Here is my code…
saperlipopette
  • 1,603
  • 12
  • 26