Options

From PDF XChange PDF SDK
Revision as of 07:19, 21 April 2016 by Palamar (Talk | contribs)

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


Options Table

Name Type Value
OldName String Specifies an old name of the named destination.

Default value: Empty String

NewName String Specifies a new name of the named destination.

Default value: Empty String

Sample

//C#
private void RenameNamedDestination(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.pdfNamedDests.rename", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	var input = Op.Params.Root["Input"];
	input.Add().v = Doc.CoreDoc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	PDFXEdit.IPXC_NameTree Tree = Doc.CoreDoc.GetNameTree("Dests");
	if (Tree.Count > 0)
	{
		options["OldName"].v = Tree.get_ItemName(0);
		options["NewName"].v = "New Destination Name";
		Op.Do();
	}
}