This content has been marked as final.
Show 6 replies
-
1. Re: Displaying HTML bad formatted text in PDF
kermit.krispower.gmail.com Oct 2, 2008 7:01 PM (in response to kermit.krispower.gmail.com)Does anyone have encountered this problem before? Many thanks!
-
2. Re: Displaying HTML bad formatted text in PDF
norman Oct 2, 2008 9:59 PM (in response to kermit.krispower.gmail.com)I guess you'll have to run the HTML through something like tidy.
-
3. Re: Displaying HTML bad formatted text in PDF
kermit.krispower.gmail.com Oct 2, 2008 11:17 PM (in response to kermit.krispower.gmail.com)Thanks for the reply, so you suggest to run a HTML validation before submit the data into the database? Can you tell me a little bit more about the tidy?
Appreciate all your help. Thanks,
Chris
-
5. Re: Displaying HTML bad formatted text in PDF
kermit.krispower.gmail.com Oct 3, 2008 12:50 AM (in response to kermit.krispower.gmail.com)Thank you so much!
-Chris
-
6. Re: Displaying HTML bad formatted text in PDF
kermit.krispower.gmail.com Oct 31, 2008 11:11 PM (in response to kermit.krispower.gmail.com)We decided to use JTidy to clean up the bad HTML. However, the Jtidy didn't clean the HTML code properly?
Below I just have <ul> tag, jTidy ended with </ul>.
2008-10-31 15:06:06,218 INFO [STDOUT] <ul> <li>list item #1<li> <li>list item #2</li> <li>list item #3</li> <li>list item #4</li> <li>list item #5</li> 2008-10-31 15:06:06,218 INFO [STDOUT] <?xml version="1.0" encoding="Cp1252"?> <html> <head /> <body> <ul> <li>list item #1</li> <li></li> <li>list item #2</li> <li>list item #3</li> <li>list item #4</li> <li>list item #5</li> </ul> </body> </html>
But this time I've left out <ul> and </ul> tags. JTidy did not completed the tags automatically.
2008-10-31 15:08:17,929 INFO [STDOUT] <li>list item #1<li> <li>list item #2</li> <li>list item #3</li> <li>list item #4</li> <li>list item #5</li> 2008-10-31 15:08:17,929 INFO [STDOUT] <?xml version="1.0" encoding="Cp1252"?> <html> <head /> <body> <li>list item #1</li> <li></li> <li>list item #2</li> <li>list item #3</li> <li>list item #4</li> <li>list item #5</li> </body> </html>
And is there anyway I can set JTidy not to put those <html> <head> and Mbody> tags?
Thanks in advance !!
-Chris