op.addContent

From PDF XChange PDF SDK
Jump to: navigation, search
(Sample)
 
(One intermediate revision by the same user not shown)
Line 25: Line 25:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//C#
 +
private void AddContent(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Content Content)
 +
{
 +
int nID = Inst.Str2ID("op.addContent", false);
 +
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
 +
PDFXEdit.ICabNode input = Op.Params.Root["Input"];
 +
input.Add().v = Doc.CoreDoc;
 +
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
 +
options["Content"].v = Content;
 +
options["TargetPage"].v = 0;
 +
options["InsertClone"].v = true;
 +
Op.Do();
 +
}
 +
</pre>

Latest revision as of 07:27, 15 April 2016


Overview

The operation allows to modify content of the documents pages.

Parameters

Name Type Description
Input Array Array of IUnknown-based objects containing the IPXC_Document which content will be modified.
Output Array Array of IUnknown-based objects containing the IPXC_Document that had it's content modified.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void AddContent(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst, PDFXEdit.IPXC_Content Content)
{
	int nID = Inst.Str2ID("op.addContent", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = Op.Params.Root["Input"];
	input.Add().v = Doc.CoreDoc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	options["Content"].v = Content;
	options["TargetPage"].v = 0;
	options["InsertClone"].v = true;
	Op.Do();
}