From Tracker Software PDF SDK
Revision as of 03:47, 18 April 2016 by Palamar (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Options Table

Name Type Value
Attachment IUnknown Specifies the IPXC_FileSpec which description would be edited.
Annot IUnknown Specifies the linked IPXC_Annotation which description would be modified along the file attachment.
Description String Specifies the new description of the attachment and linked annotation if the attachment has one.

Default value: Empty String


private void EditAttachmentDescription(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
	int nID = Inst.Str2ID("op.attachments.edit", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = Op.Params.Root["Input"];
	input.Add().v = Doc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	PDFXEdit.IPXC_NameTree pTree = Doc.CoreDoc.GetNameTree("EmbeddedFiles");
	PDFXEdit.IAFS_FileSys pFSys = fsInst.DefaultFileSys;
	string sName;
	uint nAttachmentsCount = pTree.Count;
	if (nAttachmentsCount == 0)
	PDFXEdit.IPXS_PDFVariant pValue;
	//Getting first attachment
	pTree.Item(0, out sName, out pValue);
	PDFXEdit.IPXC_FileSpec FS = Doc.CoreDoc.GetFileSpecFromVariant(pValue);
	options["Attachment"].v = FS;
	options["Description"].v = "Fist attachment's description";