Hello Paulo, Thanks for your prompt reply. I have attached the original images and cerated PDF file. http://www.nabble.com/file/p11097753/adobeRGB.jpg http://www.nabble.com/file/p11097753/colorMatchRGB.jpg http://www.nabble.com/file/p11097753/sRGB.jpg http://www.nabble.com/file/p11097753/image.pdf image.pdf
I am getting same colorspace for all the image. Do some one have any idea? Any help will be appereciated. Regards Jaya N pasachhe. Paulo Soares wrote: > > That all depends on the original image format, if it has an icc profile, > etc. Without the original images I can't add more. > > Paulo > > ----- Original Message ----- > From: "linkjaya" <[EMAIL PROTECTED]> > To: <itext-questions@lists.sourceforge.net> > Sent: Wednesday, June 13, 2007 12:22 PM > Subject: Re: [iText-questions] getting the information of images in PDF > file > > >> >> Thanks for your reply. I am now able to read the information of image. >> >> I created a PDF file with 3 images using Itext. Each images contains >> different colorspace >> 1. sRGB >> 2. adobeRGB & >> 3. colorMatchRGB >> >> Then i write a program that gives information of color space in images in >> PDF file. >> My program looks like this. >> for (int i = 0; i < reader.getXrefSize(); i++) >> { >> PdfObject pdfobj = reader.getPdfObject(i); >> if (pdfobj != null) >> { >> if (pdfobj.isStream()) >> { >> PdfStream pdfdict = (PdfStream) pdfobj; >> PdfObject pdfsubtype = pdfdict.get(PdfName. >> SUBTYPE); >> if (pdfsubtype == null) { >> continue; >> } >> if (!pdfsubtype.toString().equals(PdfName. >> IMAGE.toString())) { >> continue; >> } >> System.out.println("height:" + >> pdfdict.get(PdfName.HEIGHT)); >> System.out.println("width:" + >> pdfdict.get(PdfName.WIDTH)); >> System.out.println("Color Space: " + >> pdfdict.get(PdfName.COLORSPACE)); >> System.out.println("Cal Gray: " + >> pdfdict.get(PdfName.CALGRAY)); >> System.out.println("Cal RBG: " + >> pdfdict.get(PdfName.CALRGB)); >> System.out.println("bitspercomponent:" + >> pdfdict.get(PdfName.BITSPERCOMPONENT)); >> } >> } >> } >> } >> >> But for each image in PDF, >> The color space for the image is /DeviceRGB. >> Why is so? >> Do itext change the color space of image to /DeviceRGB when a PDF is >> created? >> Any help will be appreciated. >> >> Thanks and regards >> Jaya N Pasachhe. >> >> Paulo Soares wrote: >>> >>> You'll have to look at the page resources and any form xobject that the >>> page >>> contains. There is code in BaseFont to find the fonts, you can adapt it >>> to >>> find the images. >>> >>> Paulo >>> >>> ----- Original Message ----- >>> From: "linkjaya" <[EMAIL PROTECTED]> >>> To: <itext-questions@lists.sourceforge.net> >>> Sent: Monday, June 11, 2007 12:59 PM >>> Subject: [iText-questions] getting the information of images in PDF file >>> >>> >>>> >>>> Hello ALL, >>>> >>>> I have created a PDF file which contains some images. How can i get the >>>> information about images on that PDF later when i need it. The >>>> infomation >>>> are color space , size etc. Is there any standard way to find out the >>>> images >>>> on the PDF file and get the infomation of it? >>>> >>>> Can some one send me the sample code for this purpose? Any help will be >>>> appreciated. >>>> >>>> Thanks and reagards. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ > > -- View this message in context: http://www.nabble.com/getting-the-information-of-images-in-PDF-file-tf3901161.html#a11097753 Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/