tcpdf

[PHP & TCPDF] How to center html table?

Trying to create proper PDF document, using PHP and TCPDF. Can you help me, how can I use writeHTML function to create and center table, in TCPDF? Tryed with: $html = ' <div style="margin-left: auto; margin-right: auto; width: 50%"> <table border="1" width="200" align="center"><tr><td><b>Invoice number: '.$this->xInvoiceNumber.'...

Nested table height in TCPDF

Is it possible to make nested table fit height of its parent cell in TCPDF? My code: <?php require_once('tcpdf/config/lang/eng.php'); require_once('tcpdf/tcpdf.php'); $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); $pdf->SetFont('times...

TCPDF Specific border for different sides

Hey Everyone, I just started using TCPDF (output with HTML), and I do not understand why I can not have an inline CSS style for border like the following, style="border-right: 1px" After looking at some of the examples, the only place I see borders being used is on a table using the border="1" property. This is very frustrating, and ...

TCPDF remote image loading problem

Hi, Im trying to load a remote image into a pdf generated by tcpdf however I can't seem to get it to work? The rest of the pdf loads fine and it looks like to trying to retrieve the image however it just does print to the page? The code I am using is: $pdf->Image("http://media.domain.com/logo.jpg", 0, 0, 100, 150, 'JPEG', '', 'T', tr...

how to write barcode in html format when using tcpdf

I am using TCPDF to generate PDF file using following command $pdf->writeHTML($htmlcontent, true, 0, true, 0); TCPDF also provides a way to create barcode with following commands $pdf->Cell(0, 0, 'C39+', 0, 1); $pdf->write1DBarcode('Code 39', 'C39+', '', '', 80, 15, 0.4, $style, 'N'); $pdf->Ln(); I want to be able to write barcode as p...

tcpdf edit footer

How do I edit a footer using tcpdf? I want to add current date & time at the footer. Please help. ...

Printing carbon forms with dot matrix okidata printer

Creating an app to fill out some government forms using PHP (cakephp). The forms have about 4 layers for all the necessary parties to get a carbon copy. Which is why a dot matrix printer is being used. Here's an example form: Manifest Example: Designated Facility to Destination State (PDF) (1 pg, 93K) Should I create a PDF based on th...

I have two problems about tcpdf

Hi i am using tcpdf in my application and i have two question about that.I am able to get pdf output of a html page when i click specified button. My first question is:How can i download that html's pdf output when i click that button?($pdf->lastPage() didn'work). My second question is:How can i set character encoding for Trkish?(I am us...

word wrap in tcpdf

I'm using tcpdf to creat a pdf version of the html table below. How do I word wrap the text in the cells? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style type="text/css"> table.frm { width: 960px; Height:400px; margin-left: auto; margin-right...

Bloated PDF created by TCPDF

In a web app developed in PHP we are generating Quotations and Invoices (which are very simple and of single page) using TCPDF lib. The lib is working just great but it seems to generate very large PDF files. For example in our case it is generating PDF files as large as 4 MB (+/- a few KB). How to reduce this bloating of PDF files gen...

TCPDF outputs weird characters in IE8

Today I started experimenting with PHP-based PDF generators. I tried TCPDF and it works fine for the most part, although it seems to be a little slow. But when I load the PHP file that generates my PDF in Internet Explorer 8, I see lines and lines of weird characters. Chrome however recognizes it as a PDF. I'm assuming that I have to se...

TCPDF - How to display tableheaders on each page of table data?

All, I am trying to render a table with pages and pages of data. The rendering fails utterly from the second page onwards. Also, how can I make sure the table that extends over pages and pages has tableheaders on each and every page? This is the function I am using so far, but it doesn't seem to work very nicely from second page onward...

Symfony 1.4x and sfTCPDFPlugin

I have installed sfTCPDFPlugin in my project, but when I try to test if the installation is alright (with the source found on the official site) I get the error: Fatal error: Class 'TCPDF' not found in C:\wamp\www\mairie\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 12 How can I fix it? ...

Displaying of weird characters when creating PDF using TCPDF..

%PDF-1.7 3 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20100723054757+08'00') /Resources 2 0 R /MediaBox [0.00 0.00 595.28 841.89] /CropBox [0.00 0.00 1687.40 2386.46] /BleedBox [0.00 0.00 4783.17 6764.77] /TrimBox [0.00 0.00 4783.17 6764.77] /ArtBox [0.00 0.00 4783.17 6764.77] /Contents 4 0 R /Rotate 0 /Group << /Type /Group ...

tcpdf header image

Hello, For create custom header and footer i used tcpdf header() and footer() function but when I try to put image on header function with $this->image function image can not be displayed. others are working fine can any body knows whats the problem. thanks ...

tcpdf and image with bad links

Hi, i use latest TCPDF version. If the text is a picture of a bad link shows an error and do not generate a PDF file. Is it possible to disable this error? If you did not find the image to generate the PDF, but without a picture. I hope to understand my problem, Thanks ...

Tooltips in PDFs: are they possible?

Hi. I'm using the tcpdf PHP class for creating PDFs. Is there any solution to add tooltips to links? ...

tcpdf font ligatures (English) ?

How do you generate ligatures in PHP tcpdf? ...

PHP tcpdf small QR Code?

Is it possible to change the size of the qr code generated from tcpdf? It seems when I change the size from anything but 50,50 points, the resulting QR code becomes invalid Tried both variations - the QR code generated can't be read by a QR reader $pdf->write2DBarcode($url, 'QRCODE,H', '', '', 25, 25, $style, 'N',FALSE); $pdf->write2D...

Write variable PHP with TCPDF

Hello, I have to generate a PDF with TCPDF, my information come from my database, so I have to write PHP variables. I know how to do. But I want to write CSS + xHTML (as an example I have seen of TCPDF site) using : $html = <<<EOF <style> <!-- My CSS --> </style> <!-- My xHTML --> EOF; $pdf->writeHTML('$html', ''); I have er...