Use class com.lowagie.text.pdf.codec.TiffImage to get all the images inside the 
tiff.

Paulo 

> -----Original Message-----
> From: thulasi ram [mailto:pthulasi...@gmail.com] 
> Sent: Wednesday, October 21, 2009 8:11 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Help
> 
> Thanks for ur response.
> I have one more issue.
> I have multipage color tiff, while i'm using 
> Image.getInstance write to pdf file always getting single 
> page pdf file.
>  
> If i'll use Image.getInstance i can able to read color tiff 
> images but i'm not able to create multipage pdf file.
> If I'll use Image.getTiffImage i can't able to read color 
> tiff iamges. 
>  
> Can any one let me know how get multipage pdf file using 
> Image.getInstance. Its posible to color Tiff to pdf file using iText?
>  
> Here is my code.
> tempFile = new File(finalPath);
> FileOutputStream fileOutputStream = new FileOutputStream(tempFile);
> byte[] read = new byte[input.available()];
> 
> File cacheFile = new File(finalPath1);
> FileOutputStream bos = new FileOutputStream(cacheFile);
>    
> ByteArrayOutputStream outfile = new ByteArrayOutputStream();
> Document document = new Document(PageSize.A4.rotate());
> PdfWriter writer = PdfWriter.getInstance(document, bos);
> writer.setStrictImageSequence(true);
> document.open();
> Image tiff = Image.getInstance(read);
> tiff.scaleToFit(800, 600);
> document.add(tiff);
> document.close();
> outfile.flush();
> 
>  
>  
> 
> 
>  
> On Mon, Oct 19, 2009 at 3:39 PM, Paulo Soares 
> <psoa...@glintt.com> wrote:
> 
> 
>       Not only that, if you use a stream it's read to a byte 
> array. Use a file
>       instead.
>       
>       Paulo
>       
> 
>       ----- Original Message -----
>       From: "Mark Storer" <msto...@autonomy.com>
>       To: "Post all your questions about iText here"
>       <itext-questions@lists.sourceforge.net>
>       
>       Sent: Monday, October 19, 2009 9:24 PM
>       Subject: Re: [iText-questions] Help
>       
>       
>       Give the JVM more memory when you create it:
>       http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html
>       
>       This has almost nothing to do with iText, and 
> everything to do with Java.
>       
>       
>       --Mark Storer
>        Senior Software Engineer
>        Cardiff.com
>       
>       #include <disclaimer>
>       typedef std::Disclaimer<Cardiff> DisCard;
>       
>       -----Original Message-----
>       From: thulasi ram [mailto:pthulasi...@gmail.com]
>       Sent: Monday, October 19, 2009 11:15 AM
>       To: itext-questions@lists.sourceforge.net
>       Subject: [iText-questions] Help
>       
>       Hi all,
>        I'm using iText Tiff2pdf method for converting Tiff to 
> image pdf. I'm
>         getting "Outofmemory" error while converting large 
> size (morethen 5MB)
>         images in the line of
>         ra = *new* RandomAccessFileOrArray(inStream);.
>         Can any one help how to create pdf for large size Tiff images.
>       
>       Thanks,
>       Ram
>       
>       
>       
>       
>       
> --------------------------------------------------------------
> ----------------
>       Come build with us! The BlackBerry(R) Developer 
> Conference in SF, CA
>       is the only developer event you need to attend this 
> year. Jumpstart your
>       developing skills, take BlackBerry mobile applications 
> to market and stay
>       ahead of the curve. Join us from November 9 - 12, 2009. 
> Register now!
>       http://p.sf.net/sfu/devconference
>       _______________________________________________
>       iText-questions mailing list
>       iText-questions@lists.sourceforge.net
>       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/
>       
> 
> 
> 

Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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