Do the file looks normal when viewed in a tiff viewer? If it does then post a link to the file for inspection.
Paulo ----- Original Message ----- From: "Sandon Jacobs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Post all your questions about iText here" <[email protected]> Sent: Wednesday, April 04, 2007 5:44 PM Subject: Re: [iText-questions] Tiff conversion to PDF Issue > The same thing happens from the file system. > > Thanks > SLJ > > Sandon L Jacobs > BlueCross BlueShield of North Carolina > ISBA - EAI COE > Application Developer (SCJP) > (o) (919) 765-2462 > (c) (919) 730-2430 > [EMAIL PROTECTED] > > >>>> [EMAIL PROTECTED] 3/29/2007 6:23:46 PM >>> > > It doesn't look like an iText problem. Load the files from disk and see > what > happens. > > Paulo > > ----- Original Message ----- > From: "Sandon Jacobs" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Thursday, March 29, 2007 5:22 PM > Subject: [iText-questions] Tiff conversion to PDF Issue > > >>I am creating a single PDF file from multiple TIFF images. Each image > is >> received as a byte[] from an JCA adapter to the FileNet product. > Each >> TIFF is a single-page TIFF. When I render the PDF, the first page > only >> prints the bottom-left portion of the first page, with all other > pages >> fully-intact. See the code below: >> >> ************************************************************** >> FileNetDocument fnDoc = df.findDocument(docNumber); >> document = new Document(); >> >> PdfWriter writer = PdfWriter.getInstance(document, >> resp.getOutputStream()); >> >> document.open(); >> PdfContentByte cb = writer.getDirectContent(); >> >> log("Converting " + fnDoc.getNumberOfPages() + " into 1 PDF..." ); >> >> pages = this.prepareByteArrays(fnDoc.getPages()); >> for (int i = 0; i < pages.length; i++) { >> log("Starting page # " + i); >> RandomAccessFileOrArray current = pages[i]; >> int comps = TiffImage.getNumberOfPages(current); >> >> for (int c = 1; c <= comps; c++) { >> Image currImg = TiffImage.getTiffImage(current, c); >> >> currImg.setAbsolutePosition(0, 0); >> document.setPageSize(new Rectangle(currImg.scaledWidth(), >> currImg.scaledHeight())); >> document.newPage(); >> >> cb.addImage(currImg); >> >> } >> writer.flush(); >> log("Done with page # " + i); >> } >> resp.setContentType("application/pdf"); >> resp.flushBuffer(); >> >> ************************************************************** >> >> >> I know there is not a problem with the TIFF of the first page > because >> if I changes the pages[i] in the for loop to be pages[1] each time, > that >> TIFF is printed fully intact on the other pages of the PDF. >> >> Please HELP!!! >> >> Thanks in advance... ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
