op.document.addHeaderAndFooter

From PDF XChange PDF SDK
Jump to: navigation, search
(Automatic page editing by robot)
 
(Sample)
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
{{#customTitle:op.document.addHeaderAndFooter}}
 
{{#customTitle:op.document.addHeaderAndFooter}}
 
{{#parentPage:PXV:Operations|op.document.addHeaderAndFooter|operation}}
 
{{#parentPage:PXV:Operations|op.document.addHeaderAndFooter|operation}}
{{ToWrite}}
 
 
{{ToReview}}
 
{{ToReview}}
  
 
== Overview ==
 
== Overview ==
The operation overview...
+
The operation allows to add headers and footers to the document.
  
 
== Parameters ==
 
== Parameters ==
Line 15: Line 14:
 
|-
 
|-
 
| class="op_param_name" | Input
 
| class="op_param_name" | Input
| style="text-align:center" | Array
+
| style="text-align:center" | IUnknown
| Array of <code>IUnknown</code>-based objects.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] which the headers and footers will be added to.
 
|-
 
|-
 
| class="op_param_name" | Output
 
| class="op_param_name" | Output
| style="text-align:center;" | Array
+
| style="text-align:center;" | IUnknown
| Array of <code>IUnknown</code>-based objects.
+
| <code>IUnknown</code>-based object containing the [[PXV:IPXC_Document|IPXC_Document]] with added headers and footers. Not yet implemented.
 
|-
 
|-
 
| class="op_param_name" | [[PXV:op_document_addHeaderAndFooter_Options|Options]]
 
| class="op_param_name" | [[PXV:op_document_addHeaderAndFooter_Options|Options]]
Line 26: Line 25:
 
| Dictionary with options of the operation.
 
| Dictionary with options of the operation.
 
|}
 
|}
 +
 +
== Sample ==
 +
<pre class="brush:c#">//C#
 +
private void AddHeaderFooter(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
 +
{
 +
int nID = Inst.Str2ID("op.document.addHeaderAndFooter", false);
 +
PDFXEdit.IOperation Op = Inst.CreateOp(nID);
 +
var input = Op.Params.Root["Input"];
 +
input.v = Doc.CoreDoc;
 +
PDFXEdit.ICabNode options = Op.Params.Root["Options"];
 +
options["PagesRange.Type"].v = "All";
 +
options["CenterHeaderText"].v = "Central Header Text";
 +
options["RightFooterText"].v = "<<1 of n>>";
 +
options["Font.Size"].v = 42;
 +
Op.Do();
 +
}
 +
</pre>

Latest revision as of 00:51, 14 November 2016


Overview

The operation allows to add headers and footers to the document.

Parameters

Name Type Description
Input IUnknown IUnknown-based object containing the IPXC_Document which the headers and footers will be added to.
Output IUnknown IUnknown-based object containing the IPXC_Document with added headers and footers. Not yet implemented.
Options Dictionary Dictionary with options of the operation.

Sample

//C#
private void AddHeaderFooter(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
{
	int nID = Inst.Str2ID("op.document.addHeaderAndFooter", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	var input = Op.Params.Root["Input"];
	input.v = Doc.CoreDoc;
	PDFXEdit.ICabNode options = Op.Params.Root["Options"];
	options["PagesRange.Type"].v = "All";
	options["CenterHeaderText"].v = "Central Header Text";
	options["RightFooterText"].v = "<<1 of n>>";
	options["Font.Size"].v = 42;
	Op.Do();
}