dmholte wrote:
> 
> I am using iText 2.0.7 and am trying to parse HTML data that is  currently
> displayed as a web page and instead try to display it in a pdf.  This data
> varies in size. I have a specific example where the first page is blank
> except for the header and first row of data.  The rest of the note appears
> "together" on the next couple  of the pages.  Is there a way to keep the
> entire note together eliminating the gap in the first page?  It seems as
> if the problem occurs when there is more than 1600 characters in the <td>
> tag.   I've read the book chapter 7, but am not clear on how this can be
> used when using the html parser and everything is added to the document? 
> I've attached my stand alone class that outputs the pdf to the
> c:\PDFReports directly.  using this you can recreate the problem. 
> 
> I've uploaded the report -PDF File
> I've uploaded the code itself
> 
> Thank you so much, 
> Sincerely, 
> Dawn  http://www.nabble.com/file/p24094014/123456_1245334731290_ROI.pdf
> 123456_1245334731290_ROI.pdf 
> http://www.nabble.com/file/p24094014/ParseBuildPdf.java ParseBuildPdf.java 
> 

I've also tried using MultiColumnText, but am not sure if I am using it
correctly with the HTMLWorker component.  Trying it this way did not resolve
the gap / blank page issue.  Any help would be appreciated. 

            document.open();
            System.out.println("In Main after document.open");
            headerTable.setWidthPercentage(100); 
            document.add(headerTable); //Step 4 adding content - adding the
header, then the note
            
            
             PdfContentByte cb = writer.getDirectContent();
             //ColumnText ct = new ColumnText(cb);
              MultiColumnText mct = new
MultiColumnText(document.top()-document.bottom());
              mct.addRegularColumns(document.left(), document.right(), 10f,
1);
            
            
             ArrayList p = HTMLWorker.parseToList(new
StringReader(HospNote),null);
                           for (int k=0;k<p.size(); ++k){
                           mct.addElement((Element)p.get(k));
                           
                           }
                           do{
                            document.add(mct);
                            mct.nextColumn();
                            document.newPage();
                           } while (mct.isOverflow());
                               

-- 
View this message in context: 
http://www.nabble.com/HTML-Parser-Blank-Page-in-PDF-tp24094014p24099598.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to