Class PrinceControl
Class for creating persistent Prince control processes that can be used for multiple consecutive document conversions.
Inherited Members
Namespace: PrinceXML.Wrapper
Assembly: PrinceXML.Wrapper.dll
Syntax
public class PrinceControl : PrinceBase
Constructors
| Improve this Doc View SourcePrinceControl(String, PrinceEvents)
Constructor for PrinceControl.
Declaration
public PrinceControl(string princePath, PrinceEvents events = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | princePath | The path of the Prince executable. For example, this may be
|
| PrinceEvents | events | An implementation of |
Properties
| Improve this Doc View SourceVersion
Get the version string for the running Prince process.
Declaration
public string Version { get; }
Property Value
| Type | Description |
|---|---|
| System.String | The version string. |
Methods
| Improve this Doc View SourceAddFileAttachment(Byte[], String, String)
Add a file attachment that will be attached to the PDF file.
Declaration
public void AddFileAttachment(byte[] attachment, string fileName, string description)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | attachment | The file attachment as a byte array. |
| System.String | fileName | The filename of the file attachment. |
| System.String | description | The description of the file attachment. |
AddPdfEventScript(PdfEvent, Byte[])
Include an AcrosJS script to run on a specific event.
Declaration
public void AddPdfEventScript(PdfEvent pdfEvent, byte[] pdfScript)
Parameters
| Type | Name | Description |
|---|---|---|
| PdfEvent | pdfEvent | The PDF event. |
| System.Byte[] | pdfScript | The AcroJS script as a byte array. |
AddScript(Byte[])
Add a JavaScript script that will run before conversion.
Declaration
public void AddScript(byte[] script)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | script | The script as a byte array. |
AddStyleSheet(Byte[])
Add a CSS style sheet that will be applied to each input document.
Declaration
public void AddStyleSheet(byte[] styleSheet)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | styleSheet | The CSS style sheet as a byte array. |
Convert(List<String>, Stream)
Class for creating persistent Prince control processes that can be used for multiple consecutive document conversions.
Declaration
public override bool Convert(List<string> inputPaths, Stream output)
Parameters
| Type | Name | Description |
|---|---|---|
| List<System.String> | inputPaths | |
| Stream | output |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceConvert(Stream, Stream)
Class for creating persistent Prince control processes that can be used for multiple consecutive document conversions.
Declaration
public override bool Convert(Stream input, Stream output)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | input | |
| Stream | output |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceConvert(String, Stream)
Class for creating persistent Prince control processes that can be used for multiple consecutive document conversions.
Declaration
public override bool Convert(string inputPath, Stream output)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | inputPath | |
| Stream | output |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceConvertString(String, Stream)
Class for creating persistent Prince control processes that can be used for multiple consecutive document conversions.
Declaration
public override bool ConvertString(string input, Stream output)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | input | |
| Stream | output |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
| Improve this Doc View SourceSetPdfScript(Byte[])
Include an AcroJS script to run when the PDF is opened.
Declaration
public void SetPdfScript(byte[] pdfScript)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | pdfScript | The AcroJS script as a byte array. |
Start()
Start a Prince control process that can be used for multiple consecutive document conversions.
Declaration
public void Start()
Stop()
Stop the Prince control process.
Declaration
public void Stop()