This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes create pdf from html string using itext Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "create pdf from html string using itext" Watch "create pdf from html string using itext" New topic
Author

create pdf from html string using itext

Jigar Gajjar
Greenhorn

Joined: Apr 24, 2010
Posts: 5
Hi ,
I want to create pdf from the string containg html data, thought it works fine with English content but does not work when i try to convert it with japan, china, taiwan korea content.

My code snipet is as below:



Please let us know what can be done, its very urgent.

thanks in advance
Vishal Shaw
Ranch Hand

Joined: Aug 09, 2012
Posts: 179
Hi,

This is an encoding problem. iText is not using utf-8 .Check that.

Vishal


Programming is about thinking, NOT coding
Jigar Gajjar
Greenhorn

Joined: Apr 24, 2010
Posts: 5
Hi Vishal,
thanks for quick reply,
can you suggest , how can i tweak my code to make it work?
thanks
Vishal Shaw
Ranch Hand

Joined: Aug 09, 2012
Posts: 179
Jigar Gajjar wrote:Hi Vishal,
thanks for quick reply,
can you suggest , how can i tweak my code to make it work?
thanks


you can check this link. But first, are you sure that your htmlStr is holding the correct encoded string, if not , you need to correct that first.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create pdf from html string using itext
 
Similar Threads
converting html to pdf
Float problem
HTML to HTML conversion using Java
IE shows a horrifying gap!
how to get input from javascript and pass to servlet