?
Solved

Creating pdf documents out of html, with charset encoding utf-8

Posted on 2006-06-02
13
Medium Priority
?
3,384 Views
Last Modified: 2008-01-09
I need to create pdf documents in thai language. The templates already exist in HTML so an HTML to PDF converter would be really great. I came across ufpdf and tcpdf but their HTML support is not good. The author of dompdf, a tool for HTML to PDF conversion, wrote he would include tcpdf support in the next release, so I'm waitng. If anyone else has a better free solution (no pdflib as it requires a license) please tell me.
It could be a binary app for linux that I could call from php, does not have to be a php solution.

Thanks
0
Comment
Question by:Bleupomme
  • 7
  • 4
12 Comments
 
LVL 10

Assisted Solution

by:ClickCentric
ClickCentric earned 320 total points
ID: 16820365
I'm not sure if it would work for Thai, but I've used this before.  It's perl instead of php, but it can be run from the command line.

http://search.cpan.org/~autrijus/PDF-FromHTML-0.12/lib/PDF/FromHTML.pm
0
 
LVL 2

Expert Comment

by:feha
ID: 16828304
Hi Check www.fpdf.org 


feha
www.vision.to
0
 

Author Comment

by:Bleupomme
ID: 16828652
feha: fpdf is iso or cjk, not utf-8 compliant - ufpdf and tcpdf are utf-8 versions of fpdf

ClickCentric: That seems promising will try it
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Bleupomme
ID: 16828679
feha:
1. Just checked, yes fpdf has thai support. The problem is, it's not utf-8 (I would like to find a definitive solution for utf-8 as I could in the future be confronted with hebrew or other languages.
2. the html to pdf conversion is not very good even with html2fpdf.
0
 
LVL 2

Expert Comment

by:feha
ID: 16828680
Her is extention for UTF-8
http://www.acko.net/node/56
0
 

Author Comment

by:Bleupomme
ID: 16828714
feha: Yes I already tried that. See my question, ufpdf. Thx for the help nevertheless :)
0
 
LVL 2

Accepted Solution

by:
feha earned 680 total points
ID: 16828753
There is very good one very cheap but for windows:
http://www.yessoftware.com/products/product_detail.php?product_id=50


And here is one more free
http://www.tufat.com/s_html2ps_html2pdf.htm


:-)
0
 

Author Comment

by:Bleupomme
ID: 16828919
I need a solution for Linux. So will try html2pdf and the perl PDF-FromHTML-0.12.
This utf-8 problem seems to be more complicated than I thought
0
 

Author Comment

by:Bleupomme
ID: 16829032
Ok some information:
 html2pdf in php seems to be a port of PDF-FromHTML html2pdf perl script into php. So these are probably the solutions I need - still needs testing
0
 

Author Comment

by:Bleupomme
ID: 16871919
Ok after a lot of testing
http://www.tufat.com/s_html2ps_html2pdf.htm
seems to be the best solution. It's a bit ressource consuming but it works great, and the HTML conversion is nearly perfect.
The perl script isn't bad either, but the HTML conversion is not outstanding and I had some problems with the display of thai fonts, some glyphs were displayed wrong .
I would recommend to everybody  http://www.tufat.com/s_html2ps_html2pdf.htm . I still dont have the code I want but the support from the author is really great. It does not display hebrew and arabic though but the author assured he would include that too.

Thank to you both for your help.
0
 
LVL 2

Expert Comment

by:feha
ID: 16871958
Thank You :-)
0
 

Author Comment

by:Bleupomme
ID: 16871995
Have clicked the button too quickly. Have asked to reopen question so I could share the points between you guys.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question