tcpdf

Which is the best PDF library for PHP?

I'm wondering which is the best PDF creation library for PHP, mainly for creating PDFs from scratch (not as much HTML to PDF)? I have worked with FPDF for quite a while now, but it's getting quite old and hasn't had much for updates. I found TCPDF the other day (thanks you another question on SO). It seems very good and is based on FPDF...

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 GetCharWidth/GetStringWidth to support me in doing it on my own, but besides a potential performance lost I...

PHP / TCPDF library - Size an image in a PDF to a specific number of inches?

Does anyone know how to get TCPDF to output a .GIF file with a specific number of inches width x height? I am trying to get a GIF embedded in a PDF so that it will print at exactly 4x6 inches. I tried this: $this->setpageUnit('in'); $this->Image($tmp, 0, 0, 4, 6, 'gif', '', '', true); But that only seemed to result in a blank page....

tcpdf - start with existing PDF document

I have several PDF templates that I would like to load and modify and output using tcpdf. Is it possible to load an existing PDF and use it as a starting point in tcpdf? ...

text flowing out of border in pdf

I have created a pdf using tcpdf in php. i have a table with one row and one column. when i put the content from a form which is a textarea, the content in the form flows out of the table border. how can i make it so that it is contained in the border itslef??? ...

Maual Page Break in TCPDF

I am using TCPDF to generate the PDF in one of my project. I simply create a HTML and give it to the TCPDF to handle the PDF generation. But now I have certain HTML where multiple certificates are added one after the other and I want to have a page break into it. Page Break should be decide by HTML i.e. I want to know if there is any ide...

TCPDF Div Border doesn't work

Hi, I tried to generate pdf using TCPDF with html content. My html code is <div style="border:1px solid #000; width:200px; height: 100px"> Test Border</div> But it just generate text only. I didn't see div and border. Is that not supported or am i wrong ? Or how can i make it work ? Thanks. ...

Creating a new Pdf by Merging Pdf documents using TCPDF [php]

How 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. ...

<strong> tag using TCPDF

I'm having a hard time generating pdfs with tcpdf. Generally, everything works fine, but, sometimes, when I use the < strong > tag, everything gets messed up. I have 2 examples: http://ontheweb.com.br/pdf/ex2.pdf Can anyone help?? ...

TCPDF UTF8 - weird spacing between characters

Pls have a look at the following picture http://dev.mosaicware.pl/tmp/PDF-utf-problem.png As you can se PL and RO characters are looking weird, they look fine on the webpage. Any clue? I've used arialunicid0 font and following code (characters in DB are UTF-8): $pdf = new models_PdfUtf(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, t...

Problem with tcpdf Pagebreak

Hi, I have a little problem with a pagebreak. The Multicell is displayed over the footer of the first page and then it breaks: How can I set the bottom margin of the page so that the break happened earlier above? Here is the example PDF: Example and here the sourcecode: <?php require_once('../tcpdf/config/lang/eng.php'); require_on...

Changing or eliminating Header & Footer in TCPDF

AddPage() in tcpdf automatically calls Header and Footer. How do I eliminate/override this? ...

TCPDF twice as slow as FPDF with same code

I currently use FPDF to create some fairly complicated reports and am trying to upgrade to TCPDF, but I've found that my same code running through TCPDF is about twice as slow. Because my PDFs already take up to a minute to generate I can't really afford to have this slowdown, but I'd really like to take advantage of some TCPDF features ...

TCPDF Auto Page Break Not Working if Widths set

I have a very specific 2 column layout I'm trying to set up for a client using TCPDF. AutoPageBreak works fine if you're sending text to a page with writeHTML and multiCell at the default width of the page. When I set a narrower width for a multiCell TCPDF doesn't know when to page break. This is driving me insane. Here's super simple e...

Nested Cells TCPDF

Hi Guys, Im using TCPDF for the first time and am laying out some data using cells, the problem is because i am using multiple cells to layout what is essentially one item when the page breaks the items will split up rather than breaking all together. Is there any way where you can nest cells / multicells in TCPDF?? Thanks ...

Using TCPDF and FPDI with cake php

Hi Guys, I have go TCPDF setup in my cake php install and am now trying to also use FPDI with it as i need to add a PDF to the start of the PDF that is being generated. WHen trying to do this i am using 3 classes XTCPDF which holds my header data FPDI - FPDI class TCPDF - TCPDF class and it is setup as so: XTCPDF extends FPDI FPDI...

TCPDF PDF forms, signing certificates and how to enable user's rights

This is driving me completely and utterly nuts... Basically I have a PDF form generated by TCPDF and want to set the user rights (using setUserRights) for that PDF so that users can save the form with the data they inputted. The TCPDF manual isn't really helpful at this particular point and states that you need a "signing certificate" to...

TCPDF grey background for few cells?

I'm using TCPDF in CakePHP and trying to make some background (grey) for few cells. Well here the idea: so the grey thing would somehow have to be define outside of the cells containg text. Any ideas? Paul ...

eps image (from inkscape) not showing up in tcpdf

Using php and TCPDF to generate a pdf file. Everything works great except when I try to write an image to the pdf using ImageEPS(). Nothing shows up. No errors (it can definitely find the file). It just shows up as white space. Raster images (like PNG/JPG) work just fine. I'm using InkScape to save the .eps file. When I open the...

Is there a way to use the transactions in TCPDF when extending it with FPDI?

I am using TCPDF with FPDI's bridge. The issue I'm having is that as soon as I use the startTransaction() I get the following error: TCPDF ERROR: Cannot access protected property FPDI:$numpages / Undefined property: FPDI::$numpages and the script ends (because of the die in the TCPDF::Error() method). Here is the code I'm using: $pd...