Unable to read \Annots to get file attachment from page
Posted: Wed Jul 27, 2016 1:47 pm
I'm using C#
Ok so i have used the low level API to navigate all the way down to /Annots on the page without any issue and get
Dictionary (7061184) \Pages\Kids[3]\Kids[7] :- Type(PVT_NAME = 'Page' ), Annots(PVT_OBJREF = 'Is Dictionary' ), Parent(PVT_OBJREF = 'Is Dictionary' ), Rotate(PVT_INT = '0' ), CropBox(PVT_ARRAY), Contents(PVT_OBJREF = 'Is Dictionary' ), MediaBox(PVT_ARRAY), Resources(PVT_OBJREF = 'Is Dictionary' )
then using the Annots as the variant
XcPro40Defs.DPDFVariant_Type nefvType;
result =XcPro40Defs.PXCp_VariantGetType(variant, out nefvType);
if (nefvType.Equals(XcPro40Defs.DPDFVariant_Type.PVT_OBJREF)){
int pxcObject;
int subDictionary;
result = XcPro40Defs.PXCp_VariantGetObject(variant, out pxcObject);
result = XcPro40Defs.PXCp_ObjectGetDictionary(pxcObject, out subDictionary); <--- This returns 0 for sub directory?
}
the PXCp_VariantGetObject returns a result of 0 and the pxcObject = 511035452
but PXCp_ObjectGetDictionary returns a result of 0 which is success but the subDictionary= 0
I am using xcpro40.dll version 4.0.316.1 from release Version 5.5.315.0 of PDF-XChange PRO SDK
This only happens to the /Annots Dictionary on the page every other Dictionary works fine can tacker not deal with /annots.
The ultimate goal is to get to the /FS underneath it to extract the file stream.
Please Can You help!
Ok so i have used the low level API to navigate all the way down to /Annots on the page without any issue and get
Dictionary (7061184) \Pages\Kids[3]\Kids[7] :- Type(PVT_NAME = 'Page' ), Annots(PVT_OBJREF = 'Is Dictionary' ), Parent(PVT_OBJREF = 'Is Dictionary' ), Rotate(PVT_INT = '0' ), CropBox(PVT_ARRAY), Contents(PVT_OBJREF = 'Is Dictionary' ), MediaBox(PVT_ARRAY), Resources(PVT_OBJREF = 'Is Dictionary' )
then using the Annots as the variant
XcPro40Defs.DPDFVariant_Type nefvType;
result =XcPro40Defs.PXCp_VariantGetType(variant, out nefvType);
if (nefvType.Equals(XcPro40Defs.DPDFVariant_Type.PVT_OBJREF)){
int pxcObject;
int subDictionary;
result = XcPro40Defs.PXCp_VariantGetObject(variant, out pxcObject);
result = XcPro40Defs.PXCp_ObjectGetDictionary(pxcObject, out subDictionary); <--- This returns 0 for sub directory?
}
the PXCp_VariantGetObject returns a result of 0 and the pxcObject = 511035452
but PXCp_ObjectGetDictionary returns a result of 0 which is success but the subDictionary= 0
I am using xcpro40.dll version 4.0.316.1 from release Version 5.5.315.0 of PDF-XChange PRO SDK
This only happens to the /Annots Dictionary on the page every other Dictionary works fine can tacker not deal with /annots.
The ultimate goal is to get to the /FS underneath it to extract the file stream.
Please Can You help!