The best HTML to PDF library for PHP?
Moderator: General Moderators
Re: The best HTML to PDF library for PHP?
GIF images are generally tiny, especially if you are only using 8 or less colors.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: The best HTML to PDF library for PHP?
But it would be for an entire printable page with text and layout lines/borders. That sounds large even for GIF. One of the points of Postscript/PDF is to make these kinds of documents much smaller.
(#10850)
Re: The best HTML to PDF library for PHP?
I bet you a beer it weighs in at less than 30K.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: The best HTML to PDF library for PHP?
I am not a betting man, but I am mighty thirsty!astions wrote:I bet you a beer it weighs in at less than 30K.
(#10850)
Re: The best HTML to PDF library for PHP?
At the end we came up with using PDF Tookit, and a PDF file with a form. The idea is to fill the form and to flatten the file after that. In the middle of the next week I should have a working code, so I can post it.
---
This was my 256th post
---
This was my 256th post
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: The best HTML to PDF library for PHP?
That fill the form and to flatten sounds like it will do what I need to do. Thanks Darhazer! I will download and give it a try too.Darhazer wrote:At the end we came up with using PDF Tookit, and a PDF file with a form. The idea is to fill the form and to flatten the file after that. In the middle of the next week I should have a working code, so I can post it.
(#10850)
Re: The best HTML to PDF library for PHP?
pdftk is really easy to use, but I have problems with non-latin characters. I'm trying to fill form with Cyrillics. I'm using http://www.pdfhacks.com/forge_fdf/ for creating the FDF, because I have no the fdf extension compilled. The cyrillics are lost.
OK, I removed the encoding from the forge_fdf source, and encode my strings in UTF16BE:
$fdf_data_strings['SomeValue'] = chr(254) . chr(255) . iconv('utf-8', 'utf-16be', $someVar);
If I don't flatten the file, everything seems OK.
But when I use the flatten option, the cyrillics are gone again.
Any ideas on this?
The problems were:
* version of phptk with static linked iText - I was developing on fc8 and itext was removed from yum due to licensing issues. on fc10 there is pdftk and itext in yum
* incorrect font in the pdf file
OK, I removed the encoding from the forge_fdf source, and encode my strings in UTF16BE:
$fdf_data_strings['SomeValue'] = chr(254) . chr(255) . iconv('utf-8', 'utf-16be', $someVar);
If I don't flatten the file, everything seems OK.
But when I use the flatten option, the cyrillics are gone again.
Any ideas on this?
The problems were:
* version of phptk with static linked iText - I was developing on fc8 and itext was removed from yum due to licensing issues. on fc10 there is pdftk and itext in yum
* incorrect font in the pdf file