Does this mean that the "endDocument" method in HtmlWorker needs to be
adjusted to use Columntext depending on the element type being added? My
test class doesn't explicitly add anything to the document. The following is
what my main looks like in my test class Maybe I'm calling the parser
incorrectly. 

 

            Document document = new Document(PageSize.A4, 80, 50, 30, 65);

            try {

                        PdfWriter.getInstance(document, new
FileOutputStream("test.pdf"));

                        document.open();

                        HTMLWorker worker = new HTMLWorker(document);

                        FileReader reader = new FileReader("test.html");

                        worker.parse(reader);

            }

            

            catch(Exception e) {

                        e.printStackTrace();

                        System.err.println(e.getMessage());

            }           

            document.close();          

 

Thanks for your help 

 

DM

Danny Molloy

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 

-----Original Message-----
From: Paulo Soares [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 17, 2004 2:13 AM
To: Danny Molloy; [EMAIL PROTECTED]
Subject: [SPAM] - RE: [iText-questions] HtmlWorker - <p> tag - Email found
in subject

 

HTMLWorker is to be used with ColumnText. It uses auto-leading that the
plain document.add() doesn't support.

 


  _____  


From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Molloy
Sent: Wednesday, November 17, 2004 1:17 AM
To: '[EMAIL PROTECTED]'
Subject: [iText-questions] HtmlWorker - <p> tag

Hello, 

 

I'm experiencing problems converting paragraph "<p>" tags to pdf. The text,
when converted to PDF, appears all on the same line for paragraphs. If the
paragraph spans multiple lines the text wraps and starts overwriting on the
same line that the previous text was on. If I change the paragraph tags to
"<br>" tags, then proper paragraphs are created but then obviously loose the
paragraph properties (i.e. align="right").

 

I downloaded the latest code as of Nov 16th and am still experiencing this.
Just wondering if anyone else has experienced this or knows a work around. I
have taken a quick glance at the HtmlWorker source and it seems at the
highlevel that its calling FractoryProperties and using the standard iText
Paragraph(() so I'm not sure what would be causing it to overwrite on the
same line without delving deeper. 

 

The following is the sample HTML that I am using for testing this. I'm not
sure how this mailing list would handle html (i.e. interpret or spit out
raw... presuming it would be raw but just in case I have left out the angle
brackets and replaced them with quotes ). 

 

"html"

"body"

"p" This is a sample paragraph that spans multiple lines but wraps over the
same line there blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah "/p"

"p" This is a sample paragraph that spans multiple lines but wraps over the
same line there blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah "/p"

"ul"

"li" test list item1 "/li"

"li" test list item2 "/li"
"/ul"

"/body"

"/html"

 

 

If you need more info feel free to contact me. Thx for any help you can
provide. 

 

DM

Danny Molloy

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 

<<application/ms-tnef>>

Reply via email to