aspose file tools*
The moose likes Other Open Source Projects and the fly likes Rendering html PDF Itext weird character  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Rendering html PDF Itext weird character Â" Watch "Rendering html PDF Itext weird character Â" New topic
Author

Rendering html PDF Itext weird character Â

Stef Del
Greenhorn

Joined: Mar 08, 2010
Posts: 3
Hi all,
When i render a html pdf document with (itext) things work mostly fine. Except for one thing and that is
a weird character  i get each time.
My what i do i use ckeditor which contains this html and post this to a servlet then i render this html and get this
error.
Funny things is with jetty this gives me no problems but i get this only with tomcat.
Could anyone tell me what is going on here? Or point me in the right direction.

Many thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42276
    
  64
I'm a bit unclear on whether this happens in an HTML page or a PDF document ... what is an "html pdf document"? You mention getting the error when "i render this html" - what's the connection to iText or PDFs?


Ping & DNS - my free Android networking tools app
Stef Del
Greenhorn

Joined: Mar 08, 2010
Posts: 3
Hi,

This happens on the PDF document.
I use a servlet to render the PDF document with itext. As content to the Itext functions i pass html content.
Here you see how i render the PDF itext byte[] array.


The byte[] is written to a servlet for display. This all works fine in JETTY. When i get to TOMCAT then i get  (i guess for new line feed) in my html content.

Hope this makes my problem more clear
thanks


I'm a bit unclear on whether this happens in an HTML page or a PDF document ... what is an "html pdf document"? You mention getting the error when "i render this html" - what's the connection to iText or PDFs?

Stef Del
Greenhorn

Joined: Mar 08, 2010
Posts: 3
I solved the problem. It appears that the response econding should be set to UTF-8 also.
This solved my problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rendering html PDF Itext weird character Â