TCPDF is a PHP class created by Nicola Asuni for generating PDF documents without requiring external extensions. TCPDF Supports UTF-8, Unicode, RTL languages, XHTML, Javascript, digital signatures, barcodes and much more. It is a fork of FPDF.
Questions tagged [tcpdf]
2193 questions
20
votes
3 answers
PHP / TCPDF: Template Bug?
I have been using TCPDF for sometime. It's simple to use, outputs low size PDF and is under active development.
Following is the code for a page which should only have Hello World and a footer showing page number. However I get an additional…

abel
- 2,377
- 9
- 39
- 62
19
votes
5 answers
How to put column headings of a table on each page in tcpdf?
The code used to print the pdf is as follows:
class MYPDF extends TCPDF {
// Load table data from file
public function LoadData($file) {
// Read file lines
$lines = file($file);
$data = array();
…

PHPLover
- 1
- 51
- 158
- 311
18
votes
2 answers
How to create TCPDF HTML table with variable row paddings
I'm trying to create an HTML table in TCPDF, with few rows having grater space between rows (padding), and others having smaller padding.
$html = '
' .…
![]()
Bero_zg
18
votes
4 answers
Creating PDF with tcpdf shows blank on iphoneI am using tcpdf to produce PDF's from HTML. Everything is working fine and when I view the PDF on my computer I can see it just fine, but for some reason when I look at the PDF on my iPhone it shows up blank. All I can see are the borders I created…
![]()
Cesar Bielich
18
votes
7 answers
How to calculate the height of a MultiCell/writeHTMLCell in TCPDF?I try to create a PDF with multiple pages and need to calculate the height of each individual element (MultiCell) in advance to prepare for a page break. According to the documentation there are a couple of functions out there like…
![]()
merkuro
17
votes
1 answer
Linespacing in TCPDF MultiCellI haven't found a way to control linespacing in TCPDF's MultiCell as of version 5.9. Nor have I found any method that helps to mimic the same behaviour by using Cell, such as some method that returns the portion of the text that doesn't fit inside a…
![]()
Carles Andres
17
votes
3 answers
Attach footer at very bottom to every page in tcpdfI need to attach footer at the very bottom of every page. I am using tcpdf for generating pdf's. i tried many solution on google but did not found any luck. My current framework is yii and i am using tcpdf extension.
![]()
Muhammad Shoaib
16
votes
3 answers
TCPDF: How can I place an image into an HTML block?I've been working with TCPDF for a few months now; off and on. It's worked fairly well for most of my HTML templates, but I've always had problems placing images into the PDF's. The images are usually placed into the body, not the header. My…
![]()
jjwdesign
16
votes
1 answer
Creating multiple pages of PDF using android.graphics.pdfI am trying to create an PDF using android.graphics.pdf. My issue is with multiple pages. I can give android.graphics.pdf html which could be then printed to a PDF. Now that doesn't work if text overflows the set page size. Is it possible to give it…
![]()
neelabh
16
votes
7 answers
TCPDF, "Could not include font definition file" with OpenType fontsI am a web programmer with no in-depth knowledge of fonts and am struggling to get TCPDF to include our custom OpenType font. We have bought OpenType font files (.oft), which are not protected by any kind of DRM.
A lot of questions regarding this…
![]()
Seroczynski
16
votes
2 answers
How to use external css in tcpdf pdf generationI am trying to create a pdf of a web page with tcpdf. But it's not working. The page is a php with external css and javascript files.
Can anyone help me with this.
Thanks,
![]()
user1559230
16
votes
6 answers
Creating a new PDF by Merging PDF documents using TCPDFHow can I create a new document using other PDFs that I'm generating?
I have methods to create some documents, and I want to merge them all in a big PDF, how can I do that with TCPDF?
I do not want to use other libs.
![]()
LuRsT
15
votes
4 answers
Why is TCPDF Image smaller than it should be?I have a 842 x 595 PDF, 72 dpi and i'm inserting a 1200x800 image, again with 72dpi.
scaleFactor is 1, imageScale is 1
in theory, my pdf should show part of the image (the first 842px). In reality the ratio is wrong, i have white space to the…
![]()
Bobby Tables
15
votes
12 answers
TCPDF HTML with Special Characters displays empty PDF fileI am using TCPDF Library Version: 5.9.011. I am trying to execute HTML layout as PDF. For which I tried with example provide with the site
$html = '
HTML ExampleListSome special characters: < € € € & è è…![]()
Asif Mulla
15
votes
1 answer
Why TCPDF instead of mpdfI have used both TCPDF and MPDF !!
Just want to know what features of TCPDF make it superior and one have to choose it over MPDF even thought MPDF is much easier to implement than TCPDF ?
Anyone can please explain ?
Thanks
![]()
CodeWithCoffee
|