OK, do you know of a way to convert HTML to a resonable text representation?
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paulo Soares Sent: Tuesday, August 27, 2002 7:25 AM To: Rich Ruiz; [EMAIL PROTECTED] Subject: Re: [iText-questions] How can I import PDF pages into a Section You can't import pages into a section in the way you want to do. Pages are imported as templates not as flowing text and structure. Best Regards, Paulo Soares ----- Original Message ----- From: "Rich Ruiz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 27, 2002 4:31 Subject: [iText-questions] How can I import PDF pages into a Section > Because iText does not handle conversion of html text, I have been using > HTMLdoc to convert html text stored in a database to PDF. This worked > fine > for creating pdf representaions of individual data rows. I simply write > the > data to an HTML file then use HTMLDoc to convert it to PDF. > > I am now attempting to build a book of this data using Chapters, > Paragraphs > and Sections. I've been able to build the outline of the book but now > have a > problem. I need add the pdf to a Section. The following code adds the > actual > html text to a Section. > > String title = > row.getData("SectionTitle").getString(); > > Paragraph pTitle = new Paragraph(title, > sectionFont); > > Section subsection = > section.addSection(1,pTitle, 1); > > // SectionInfo contains HTML text > > if(!row.getData("SectionInfo").getString().trim().equals("")) > { > // This line adds the text but thats not > what I really want > Section info = new > Paragraph(row.getData("SectionInfo").getString()); > > // This is what I want to do > // This is where I would create a PDF > Document out of the text > // > /* > // I can create an htmlfile > String filename = > createHTMLFile(row); > // I can convert it to a pdf > using HTMLDoc > String pdfFile = > toPDF(filename); > // I can read the pdf > PdfReader reader = new > PdfReader(pdfFile); > int n = > reader.getNumberOfPages(); > int i = 0; > while (i < n) { > > i++; > PdfImportedPage page1 = > writer.getImportedPage(reader, > i); > > // Here is where I stuck > !!!! > // How do I add the > pages to the section? > > } > */ > > > } > catch (Exception de) { > de.printStackTrace(); > } > > subsection.add(info); > > > Any suggestions would be appreciated. > > Rich Ruiz > C3BGroup Inc. > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
