Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
To generate pdf file from html page I have used libraries like MPDF , FPDF, DOMPDF etc.
In each pdf library I found following issues.
mpdf causes unnecessary page breaks
FPDF needs more writting. etc
When I used DOMPDF it worked fine but large table didn't expanded to next page and pdf broke without generating next pages.
Then I searched for another pdf library and I came to know about TCPDF.
SO I want to know what are the disadvantages of "TCPDF"?
A great alternative for PDF generation is wkhtmltopdf. It has a smooth integration and the result is awesome. You will have to install the binary into your server, though. If you're on a VPS or dedicated, this will not be a problem.
There's a PHP lib for using it, you can find it here: https://github.com/KnpLabs/snappy
Also, there's a nice solution for the large table problem you have. Maybe it can help you with another lib too, take a look here: https://code.google.com/p/wkhtmltopdf/issues/detail?id=566
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
im new in Webdevelopment and I wanted to ask you ("THE EXPERTS") if you could guide me or give some hints how to do following Webpage:
I want to upload 3-5 Images, place them automatically horizontally on a PDF and let the user download the PDF. I don't want to store the images so after you reload the page the images should be gone.
Could you help me how to realize such webpage? Or atleast which way I should use? Jscript, html5, php etc...
Best regards
Machete
You are looking for a pdf-libary like FPDF.
Especially take a look at the Image() function (Documentation).
quick and dirty, create a php script that executes something like this on the shell:
convert image1.png image2.png image3.png output.pdf
you need to have imagemagick installed.
There are more elegant ways to do that.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a database on phpmyadmin. Then I have a website with some products. When user clicks on a specific product, he gets some details about that product. Those details are pulled from the database.
My question is: Is it possible to create a pdf file with the specific details about that product, so the user can download it?
So, the options i know are:
DOMPDF : php class that wrap the html and build the pdf. Works good, customizable, based on pdflib, if i remember right it takes even some CSS. Bad news: slow when the html is big or many complex.
this is a tutorial to follow :http://www.sitepoint.com/convert-html-to-pdf-with-dompdf/
HTML2PS: same of DOMPDF, but this one convert first in .ps (ghostscript), then, in whatever format you need (pdf, jpg, png). For me is little better then dompdf, but have the same speed problem.. oh, better compatibility with css.
Those two are php classes, but if you can install some software on the server, and access it throught passthru() or system(), give a look to these too:
wkhtmltopdf: based on webkit (safari's wrapper), is really fast and powerfull.. seem like is the best one (atm) for convert on the fly html pages to pdf, taking only 2 seconds for a 3 pages xHTML document with CSS2. Is a recent project, anyway, the google.code page is often updated.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I know this might be down voted and get closed. But i am looking for free plugin to generate pdf files from php.
I have checked Which one is the best PDF-API for PHP? this question but its almost 6 years old.
I think there might be many new plugin will build till the time.
Does anyone advise on this?
Before this question get closed.
I am not sure which one that fits your requirements.
But I seen much people talking good about tcpdf
See the list below of a couple:
ApacheFOP
dompdf
FPDF
html2ps
mPDF
PDFlib
TCPDF
wkhtmltopdf
Zend_Pdf
source:
Which one is the best PDF-API for PHP?
If you are using native PHP go with TCPDF library.
http://www.tcpdf.org/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want a simple html page that takes:
Name - user's time and date and set them in a single paged pdf then send it to a predefined email.
I am a newbie in php can you give me a simple example please?
You need external library. Click here, this pretty much give a good explanation on how to install and how to use the library.
Here is a good example
Use PDF_set_info to set information about the PDF and PDF_show for the actual content. Then if you wish to send it by email use the mail()function, click here for more information and examples.
FPDF is a great library for creating PDF Files. It is open-source (always a plus) and good for creating simple to complex PDF layouts.
You can also check out HTML2FPDF on sourceforge.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am looking for a php library which supports accepting an excel file (like .xls or .xlsx) and then some sort of functionality to create an array populated with values of each column. (Separate arrays).
I know there might not be a read to use solution thus I thought about programming it. However, I was wondering which library could I use for several scenarios?
The few I cam across were
https://github.com/PHPOffice/PHPExcel
http://sourceforge.net/projects/phpexcelreader/
https://github.com/PHPOffice/PHPExcel
I have no idea which one use, though codeplex one seems to be most functional, but I don't want to use a too heavy php library and then not end up using 90% of the code.
Also depending of the framework which one could fit better?
PHPExcel is the great library. I prefer to use it!
You can also take a look an example of this library on CodeIgniter here
I use PHPExcel at codeplex! They have great support there! Also it is very lightweight and has great documentation!