I am trying to ad PDF/VT-Support while creating a PDF using PDFLSDK10.1.1.
Before saving the document ie alter the current infor Header:
DURING
CosDoccos_doc=PDDocGetCosDoc(m_Doc);
CosObjcos_root=CosDocGetRoot(cos_doc);
ASTextmetadataASText;
CosDictGetXAPMetadata(cos_root,&metadataASText);
if(metadataASText)
{
ASTArraySizelen=0;
char*p=ASTextGetPDTextCopy(metadataASText,&len);
ASTextmetaText=ASTextNew();
ASInt32error=0;
char*p2=addXMLToCopyOf(p);
ASTextSetPDText(metaText,p2);
if(ValidateCosDict(cos_root))
CosDictSetXAPMetadata(cos_root,metaText);
ASTextDestroy(metadataASText);
}
HANDLER
...
END_HANDLER
Everything looks fine. No Error is reported.
But the header data in the XML does not contain ma added fields.
It looks totally different from the data retrieved by CosDictGetXAPMetadata.
It seems that the header is created comletely new when PDDocSave is called.