Hi Tom,
I'm so sorry, I should have double-checked before sending: my_pdf_object needs to be a pointer, not a reference type, but the rest is correct: The references in the PdfArray are stored as PdfReference instances, soto get to the objects (PdfObject instances) referenced, you need to do the following (more details in the documentation): // I assume my_pdf_doc to be of type PdfMemDocument or PdfMemDocument& // put the following lines instead of your (right-hand side here) array access PdfReference& font_ref = Arr_descendant_fonts[f]; PdfObject* my_pdf_object = my_pdf_doc.GetObjects().GetObject(font_ref); // do something with my_pdf_object here, it gets overwritten in the loop } // this you already have (here your loop body ends) Best regards, mabri ________________________________ From: Domonic Tom <abdom...@hotmail.com> To: "podofo-users@lists.sourceforge.net" <podofo-users@lists.sourceforge.net> Sent: Tuesday, 19 April 2016, 21:21 UTC Subject: [Podofo-users] Get Object from Reference is PdfArray? I have a PdfArray I have extracted from a Font Object and I want to use each Reference in the PdfArray to access the actual object. How do I do that. For example:. PdfObject my_pdf_object; if(font_object.HasKey("DescendantFonts")); { Arr_descendant_fonts = font_dictionary.GetKey("DescendantFonts")->GetArray(); } Arr_descendant_fonts_size = Arr_descendant_fonts.size(); for(int f = 0; f < Arr_descendant_fonts_size; f++) { //how do I access each object here? my_pdf_object = Arr_descendant_fonts[f]; // this doesn't work? } Thanks ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users