If I just retrieve the images as byte[] from FileNet and return the
bytes in the HttpServletResponse with contentType set to "image/tiff",
IE opens Windows Image Viewer with the image looking normal.


>>> [EMAIL PROTECTED] 4/4/2007 12:54:23 PM >>>

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
>
>
>
>>>> [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/

-------------------------------------------------------------------------
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/

Reply via email to