Moderators:TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
//export to file
var op = _Inst.CreateOp(_Inst.Str2ID("op.document.exportCommentsAndFields", false));
op.Params.Root["Input"].v = _Inst.ActiveDoc;
ICabNode cabNode = op.Params.Root["Options"];
cabNode["ExportAnnots"].v = true;
cabNode["ExportFields"].v = false;
cabNode["IncludeEmptyFields"].v = true;
cabNode["ExportFieldFlags"].v = true;
cabNode["Format"].v = "FDF";
var name = ((IAFS_Inst)_Inst.GetExtension("AFS")).DefaultFileSys.StringToName(FDFfilename, 0, (IAFS_Name)null);
cabNode["DestFile"].v = name;
op.Do();
We are parsing the FDF files, but because some PDF documents have a lot of attachements, the resulting FDF file often
has a lot of stream/endstream separated binary data, this causes problem for our parser.
Is it possible to avoid exporting the attachement binary data when doing this export?
There is no way of skipping attachments directly from the operation. However, you can make a copy of the document in memory, remove all of the attachment annotations and then do the export operation.
There is no way of skipping attachments directly from the operation. However, you can make a copy of the document in memory, remove all of the attachment annotations and then do the export operation.
Cheers,
Alex
hmm, interresting is there an operation for removing the attachements from a document? (havent searched yet )
Well attachments can be in 2 separate places - Attachment Annotations on pages and the Attachment tree dictionary. What you need are the annotations, as these are being used by the export operation.
The https://sdkhelp.pdf-xchange.com/vi ... ots_delete operation can be used to remove the needed annotations.