op.addContent

From PDF XChange PDF SDK
Jump to: navigation, search
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 = pdfCtl.Inst.Str2ID("op.addContent", false);
 +
PDFXEdit.IOperation Op = pdfCtl.Inst.CreateOp(nID);
 +
PDFXEdit.ICabNode input = Op.Params.Root["Input"];
 +
input.Add().v = pdfCtl.Doc.CoreDoc;
 +
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
 +
options["Content"].v = Content;
 +
options["TargetPage"].v = 0;
 +
options["InsertClone"].v = true;
 +
Op.Do();
 +
}
 +
</pre>

Revision as of 06:05, 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 = pdfCtl.Inst.Str2ID("op.addContent", false);
	PDFXEdit.IOperation Op = pdfCtl.Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = Op.Params.Root["Input"];
	input.Add().v = pdfCtl.Doc.CoreDoc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	options["Content"].v = Content;
	options["TargetPage"].v = 0;
	options["InsertClone"].v = true;
	Op.Do();
}