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
0
votes
1 answer
TCPDF how to disable font italic?
i'm using TCPDF library for generate PDF file, but i have problem with disabling font italic. I'm using writeHTML and have local css with body{font-style:normal;} but it's doesn't work.
Ok, i solved this problem.
I have twice…

Marceli99
- 25
- 6
0
votes
1 answer
TCPDF/TCPDI Variable not printing in merged document
I've tried a few different things and can't seem to figure out why this isn't working. This prints a page number at the bottom of the merged document. Example: If the last name is Smith, it should say Smith POL 0001. However, it's not printing the…

mike437
- 77
- 1
- 8
0
votes
1 answer
How to add a if else statement between $html in TCPDF?
$html = '// html code' is used to add html code in TCPDF. How can I add a if else statement between the quote? I added a variable by adding ' . $code . '
$html = '
if (' . get_prop($this->iform, 'temp') . ' == 0) {
…
content not breaking property (nobr) in TCPDF is not working properly in second number of

Noobs
- 47
- 6
0
votes
1 answer
TCPDF - Add "Bates Numbering" to merged PDF
I'm currently using TCPDI merge four documents into a single PDF and temporarily storing the document using a variable. Is it possible to add "Bates Numbering" to the file, starting with the third page? (The first two pages are a cover letter.)…

mike437
- 77
- 1
- 8
0
votes
0 answers
content not breaking property (nobr) in TCPDF is not working properly in second number of tag
My Problem is that i have added nobr property to price section so if content of price section is more than page one then it automatic break to second page. Then i have used that same nobr propery for the Upholstery section which is another td tag…
Bhavin Thummar
- 1,255
- 1
- 12
- 29
0
votes
1 answer
PHP: how to do page grouping/ page break in TCPDF from the records coming from SQL group by query
I am trying to do a page grouping/ page break in TCPDF from the recordsets i get from database by grouping by sql statement. Each 'group by' recordsets from database should start from a new page in PDF. I tried looking for the examples given at…
Kunal Parekh
- 380
- 6
- 24
0
votes
0 answers
How to add Currency Symbol( Rupees Symbol) in .pdf with Times Font using PHP
I am generating a PDF file, using MYHTML2PDF library in PHP, and the font type is times. I want to show the INR (Rupees) symbol in the pdf.
Rupees Symbol's code '₹' is working fine on web but not working in downloading pdf file. It shows '?'…
Nishu Garg
- 66
- 5
0
votes
1 answer
Generate PDF files with audio/video attachments with php
Is there a way to attach audio/video files to PDF files using php? The only option I could find was itext which is written in Java.
iconte
- 31
- 3
0
votes
1 answer
TCPDF - Line breaking after inserting Inline image in HTML code
I am using TCPDF's writeHTML method to insert HTML code in the PDF. If I insert an inline image (an image inside a paragraph) tag, it breaks the line. Look at the image below:
As you can see, the text on the right of the image is not on the same…
NewDeveloper123
- 11
- 3
0
votes
1 answer
TCPDF Spotcolor specific for SVG
I would like to put a specific color to a svg that i insert in a PDF thanks to TCPDF
this color will allow a printer to cut automatically
I know i would have to use spotcolors.
as here: https://tcpdf.org/examples/example_037/
the SetFillSpotColor…
S8N
- 147
- 7
0
votes
2 answers
TCPDF ERROR: Some data has already been output, can't send PDF file for my xampp server
I am trying to generate the pdf through my wordpress plugin but it is repeating the same error.What would be solution for the problem?
I have already checked the empty space before and after php tag.
require_once(plugin_dir_path(__FILE__) .…
Rafiq
- 86
- 1
- 8
0
votes
1 answer
Digital sign a PDF with PHP / Symfony / TCPDF
I'm trying to sign a pdf throw the example from "https://tcpdf.org/examples/example_052/"
My certificate file extension is ".p12" instead of ".crt". So I changed the 77 line that makes reference to the certificate.
$certificate =…
Ricard Espinàs Llovet
- 695
- 1
- 5
- 27
0
votes
0 answers
Laravel: Export PDF from blade with image
I'm trying to export a table blade with an image to PDF Using TCPDF.
My Controller:
public function exportPDF(){
$users = User::orderBy('id','DESC')->get();
$view = View::make('admin.users.export',compact('users'));
$contents =…
Hbar01
- 7
- 1
- 6
0
votes
1 answer
how to generate pdf from php without browser running?
People think there is no way to run a php file without browser running, but there is by the help of android API; when the api runs some specific files in the server(for example server is xampp in the windows os) from android application I want to…
Ghafor Yaqubi
- 21
- 8
0
votes
2 answers
Best way to convert pdf to greyscale with php?
If I want to convert a pdf to greyscale whats the best way to go about it. Im currently using tcpdf to convert html to pdf but I also need an option where I can convert it to greyscale. Whats the best way to go about doing this.
Ian
- 745
- 2
- 10
- 20
My Problem is that i have added nobr property to price section so if content of price section is more than page one then it automatic break to second page. Then i have used that same nobr propery for the Upholstery section which is another td tag…

Bhavin Thummar
- 1,255
- 1
- 12
- 29
0
votes
1 answer
PHP: how to do page grouping/ page break in TCPDF from the records coming from SQL group by query
I am trying to do a page grouping/ page break in TCPDF from the recordsets i get from database by grouping by sql statement. Each 'group by' recordsets from database should start from a new page in PDF. I tried looking for the examples given at…

Kunal Parekh
- 380
- 6
- 24
0
votes
0 answers
How to add Currency Symbol( Rupees Symbol) in .pdf with Times Font using PHP
I am generating a PDF file, using MYHTML2PDF library in PHP, and the font type is times. I want to show the INR (Rupees) symbol in the pdf.
Rupees Symbol's code '₹' is working fine on web but not working in downloading pdf file. It shows '?'…

Nishu Garg
- 66
- 5
0
votes
1 answer
Generate PDF files with audio/video attachments with php
Is there a way to attach audio/video files to PDF files using php? The only option I could find was itext which is written in Java.

iconte
- 31
- 3
0
votes
1 answer
TCPDF - Line breaking after inserting Inline image in HTML code
I am using TCPDF's writeHTML method to insert HTML code in the PDF. If I insert an inline image (an image inside a paragraph) tag, it breaks the line. Look at the image below:
As you can see, the text on the right of the image is not on the same…

NewDeveloper123
- 11
- 3
0
votes
1 answer
TCPDF Spotcolor specific for SVG
I would like to put a specific color to a svg that i insert in a PDF thanks to TCPDF
this color will allow a printer to cut automatically
I know i would have to use spotcolors.
as here: https://tcpdf.org/examples/example_037/
the SetFillSpotColor…

S8N
- 147
- 7
0
votes
2 answers
TCPDF ERROR: Some data has already been output, can't send PDF file for my xampp server
I am trying to generate the pdf through my wordpress plugin but it is repeating the same error.What would be solution for the problem?
I have already checked the empty space before and after php tag.
require_once(plugin_dir_path(__FILE__) .…

Rafiq
- 86
- 1
- 8
0
votes
1 answer
Digital sign a PDF with PHP / Symfony / TCPDF
I'm trying to sign a pdf throw the example from "https://tcpdf.org/examples/example_052/"
My certificate file extension is ".p12" instead of ".crt". So I changed the 77 line that makes reference to the certificate.
$certificate =…

Ricard Espinàs Llovet
- 695
- 1
- 5
- 27
0
votes
0 answers
Laravel: Export PDF from blade with image
I'm trying to export a table blade with an image to PDF Using TCPDF.
My Controller:
public function exportPDF(){
$users = User::orderBy('id','DESC')->get();
$view = View::make('admin.users.export',compact('users'));
$contents =…

Hbar01
- 7
- 1
- 6
0
votes
1 answer
how to generate pdf from php without browser running?
People think there is no way to run a php file without browser running, but there is by the help of android API; when the api runs some specific files in the server(for example server is xampp in the windows os) from android application I want to…

Ghafor Yaqubi
- 21
- 8
0
votes
2 answers
Best way to convert pdf to greyscale with php?
If I want to convert a pdf to greyscale whats the best way to go about it. Im currently using tcpdf to convert html to pdf but I also need an option where I can convert it to greyscale. Whats the best way to go about doing this.

Ian
- 745
- 2
- 10
- 20