op.document.addWatermarks
From PDF XChange PDF SDK
Line 25: | Line 25: | ||
| Dictionary with options of the operation. | | Dictionary with options of the operation. | ||
|} | |} | ||
+ | |||
+ | == Sample == | ||
+ | <pre class="brush:c#">//C# | ||
+ | private void AddWatermarks(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) | ||
+ | { | ||
+ | int nID = Inst.Str2ID("op.document.addWatermarks", 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["Text"].v = "Your Watermark"; | ||
+ | options["Rotation"].v = 33; | ||
+ | Op.Do(); | ||
+ | } | ||
+ | </pre> |
Latest revision as of 23:54, 18 April 2016
Overview
The operation allows to add watermark to the document.
Parameters
Name | Type | Description |
---|---|---|
Input | IUnknown | IUnknown -based object containing the IPXC_Document which the watermark will be added to.
|
Output | IUnknown | IUnknown -based object containing the IPXC_Document with added watermark. Not yet implemented.
|
Options | Dictionary | Dictionary with options of the operation. |
Sample
//C# private void AddWatermarks(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst) { int nID = Inst.Str2ID("op.document.addWatermarks", 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["Text"].v = "Your Watermark"; options["Rotation"].v = 33; Op.Do(); }