Parsing the PDF containing figure

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Parsing the PDF containing figure

Vimal kumar

I want to parse the PDF and read the Figure or drawing object like rectangle circle from PDF using PDF,

can any one please help in me this how to read that,.
i tried something like this.

PdfReader pdf = new PdfReader(@"C:\doc1test.pdf");
            PdfDictionary pg = pdf.GetPageN(1);
            PdfDictionary res = (PdfDictionary)PdfReader.GetPdfObject(pg.Get(PdfName.RESOURCES));
// to get the image Xobject is workng fine            
            PdfDictionary xobj = (PdfDictionary)PdfReader.GetPdfObject(res.Get(PdfName.XOBJECT));

            PdfDictionary xobjAll = (PdfDictionary)PdfReader.GetPdfObject(pg.Get(PdfName.FIGURE));

            PdfDictionary xobjImage = (PdfDictionary)PdfReader.GetPdfObject(res.Get(PdfName.EXTGSTATE));

but figures i am not able to capture.