Thank you for your answer. Instead of parsing twice i will just loop through the objects inside the file and get the information before calling the parser like this: for (int j = 1; j <= reader.XrefSize; j++) { PdfObject pdfobj = reader.GetPdfObject(j); if (pdfobj != null) { //determine wether object is stream if (pdfobj.IsStream()) { PdfStream pdfStream = (PdfStream)pdfobj; PdfDictionary tg = (PdfDictionary)PdfReader.GetPdfObject(pdfobj); PdfName type = (PdfName)PdfReader.GetPdfObject(tg.Get(PdfName.SUBTYPE)); if (type != null && type.ToString() == "/Image") { width = (PdfNumber)PdfReader.GetPdfObject(tg.Get(PdfName.WIDTH)); height = (PdfNumber)PdfReader.GetPdfObject(tg.Get(PdfName.HEIGHT)); } } } } Iam not sure if this is the appropriate way of doing it? Thanks
-- View this message in context: http://itext-general.2136553.n4.nabble.com/How-to-skip-text-rendering-when-parsing-image-on-text-pdf-file-tp4655822p4657300.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php