Class PrizmDocServerClient
Represents a remote PrizmDoc Server deployment you want to use. This is the main class you need to instantiate to use this SDK.
Inherited Members
Namespace: Accusoft.PrizmDocServer
Assembly: PrizmDocServerSDK.dll
Syntax
public class PrizmDocServerClient
Constructors
PrizmDocServerClient(String)
Initializes a new instance of the PrizmDocServerClient
class, allowing you to work with a PrizmDoc Server deployment at the
specified baseAddress.
Declaration
public PrizmDocServerClient(string baseAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| String | baseAddress | Base URL for connecting to your PrizmDoc
Server deployment (e.g. |
PrizmDocServerClient(String, String)
Initializes a new instance of the PrizmDocServerClient class, allowing you to work with PrizmDoc Cloud.
Declaration
public PrizmDocServerClient(string baseAddress, string apiKey)
Parameters
| Type | Name | Description |
|---|---|---|
| String | baseAddress | Base URL to PrizmDoc Server (e.g.
|
| String | apiKey | Your PrizmDoc Cloud API key. |
PrizmDocServerClient(Uri)
Initializes a new instance of the PrizmDocServerClient
class, allowing you to work with a PrizmDoc Server environment at
the specified baseAddress.
Declaration
public PrizmDocServerClient(Uri baseAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | baseAddress | Base URL for connecting to your PrizmDoc
Server deployment (e.g. |
PrizmDocServerClient(Uri, String)
Initializes a new instance of the PrizmDocServerClient class, allowing you to work with PrizmDoc Cloud.
Declaration
public PrizmDocServerClient(Uri baseAddress, string apiKey)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | baseAddress | Base URL to PrizmDoc Server (e.g.
|
| String | apiKey | Your PrizmDoc Cloud API key. |
Methods
BurnMarkupAsync(RemoteWorkFile, RemoteWorkFile)
Burns a markup JSON file into a document, producing a new PDF.
Declaration
public Task<RemoteWorkFile> BurnMarkupAsync(RemoteWorkFile sourceDocument, RemoteWorkFile markupJson)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoteWorkFile | sourceDocument | Existing RemoteWorkFile to use as the source document. |
| RemoteWorkFile | markupJson | Existing RemoteWorkFile containing the markup JSON you want burned into the source document. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new PDF. |
BurnMarkupAsync(RemoteWorkFile, String)
Burns a markup JSON file into a document, producing a new PDF.
Declaration
public Task<RemoteWorkFile> BurnMarkupAsync(RemoteWorkFile sourceDocument, string localFilePathToMarkupJson)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoteWorkFile | sourceDocument | Existing RemoteWorkFile to use as the source document. |
| String | localFilePathToMarkupJson | Path to a local markup.json file containing the markup you want burned in to the source document. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new PDF. |
BurnMarkupAsync(String, RemoteWorkFile)
Burns a markup JSON file into a document, producing a new PDF.
Declaration
public Task<RemoteWorkFile> BurnMarkupAsync(string localFilePathToSourceDocument, RemoteWorkFile markupJson)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePathToSourceDocument | Path to a local file to use as the source document. |
| RemoteWorkFile | markupJson | Existing RemoteWorkFile containing the markup JSON you want burned into the source document. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new PDF. |
BurnMarkupAsync(String, String)
Burns a markup JSON file into a document, producing a new PDF.
Declaration
public Task<RemoteWorkFile> BurnMarkupAsync(string localFilePathToSourceDocument, string localFilePathToMarkupJson)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePathToSourceDocument | Path to a local file to use as the source document. |
| String | localFilePathToMarkupJson | Path to a local markup.json file containing the markup you want burned in to the source document. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new PDF. |
CombineToPdfAsync(IEnumerable<ConversionSourceDocument>, HeaderFooterOptions, HeaderFooterOptions)
Combine pages from a collection of source documents into a PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> CombineToPdfAsync(IEnumerable<ConversionSourceDocument> sourceDocuments, HeaderFooterOptions header = null, HeaderFooterOptions footer = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ConversionSourceDocument> | sourceDocuments | Collection of source documents whose pages should be combined, in order, to form the output. |
| HeaderFooterOptions | header | Header to be appended to each page of the output document. The original page content will be left unaltered. The overall page dimensions will be expanded to accommodate the header content. |
| HeaderFooterOptions | footer | Footer to be appended to each page of the output document. The original page content will be left unaltered. The overall page dimensions will be expanded to accommodate the footer content. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
ConvertAsync(ConversionSourceDocument, DestinationFileFormat)
Convert pages of a single source document to a specified file format.
Declaration
public Task<IReadOnlyCollection<ConversionResult>> ConvertAsync(ConversionSourceDocument sourceDocument, DestinationFileFormat destinationFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| ConversionSourceDocument | sourceDocument | Information about the source document to use as input. |
| DestinationFileFormat | destinationFormat | File format to convert to. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyCollection<ConversionResult>> | One or more output results. |
ConvertAsync(ConversionSourceDocument, DestinationOptions)
Convert pages of a single source document using the full available set of destination options.
Declaration
public Task<IReadOnlyCollection<ConversionResult>> ConvertAsync(ConversionSourceDocument sourceDocument, DestinationOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ConversionSourceDocument | sourceDocument | Information about the source document to use as input. |
| DestinationOptions | options | Destination options. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyCollection<ConversionResult>> | One or more output results. |
ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationFileFormat)
Combine pages from a collection of source documents to a specified file format.
Declaration
public Task<IReadOnlyCollection<ConversionResult>> ConvertAsync(IEnumerable<ConversionSourceDocument> sourceDocuments, DestinationFileFormat destinationFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ConversionSourceDocument> | sourceDocuments | Collection of source documents whose pages should be combined, in order, to form the output. |
| DestinationFileFormat | destinationFormat | File format to convert to. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyCollection<ConversionResult>> | One or more output results. |
ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions)
Combine pages from a collection of source documents using the full available set of destination options. This is the most flexible overload, exposing all of the potential options when performing a conversion.
Declaration
public Task<IReadOnlyCollection<ConversionResult>> ConvertAsync(IEnumerable<ConversionSourceDocument> sourceDocuments, DestinationOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ConversionSourceDocument> | sourceDocuments | Collection of source documents whose pages should be combined, in order, to form the output. |
| DestinationOptions | options | Destination options. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyCollection<ConversionResult>> | One or more output results. |
ConvertAsync(String, DestinationFileFormat)
Convert a local file to a specified file format.
Declaration
public Task<IReadOnlyCollection<ConversionResult>> ConvertAsync(string localFilePath, DestinationFileFormat destinationFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to use as input. |
| DestinationFileFormat | destinationFormat | DestinationFileFormat to convert to. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyCollection<ConversionResult>> | One or more output results. |
ConvertAsync(String, DestinationOptions)
Convert a local file using the full available set of destination options.
Declaration
public Task<IReadOnlyCollection<ConversionResult>> ConvertAsync(string localFilePath, DestinationOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to use as input. |
| DestinationOptions | options | Destination options. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyCollection<ConversionResult>> | One or more output results. |
ConvertToPdfAsync(ConversionSourceDocument, HeaderFooterOptions, HeaderFooterOptions)
Convert pages of a single source document to PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> ConvertToPdfAsync(ConversionSourceDocument sourceDocument, HeaderFooterOptions header = null, HeaderFooterOptions footer = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ConversionSourceDocument | sourceDocument | Information about the source document to use as input. |
| HeaderFooterOptions | header | Header to be appended to each page of the output document. The original page content will be left unaltered. The overall page dimensions will be expanded to accommodate the header content. |
| HeaderFooterOptions | footer | Footer to be appended to each page of the output document. The original page content will be left unaltered. The overall page dimensions will be expanded to accommodate the footer content. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
ConvertToPdfAsync(String, HeaderFooterOptions, HeaderFooterOptions)
Convert a local file to PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> ConvertToPdfAsync(string localFilePath, HeaderFooterOptions header = null, HeaderFooterOptions footer = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to use as input. |
| HeaderFooterOptions | header | Header to be appended to each page of the output document. The original page content will be left unaltered. The overall page dimensions will be expanded to accommodate the header content. |
| HeaderFooterOptions | footer | Footer to be appended to each page of the output document. The original page content will be left unaltered. The overall page dimensions will be expanded to accommodate the footer content. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
CreateRedactionsAsync(RemoteWorkFile, IEnumerable<RedactionMatchRule>)
Automatically create redaction definitions for a document and a given set of text-matching rules, producing a new markup JSON file that can be used in a subsequent operation to actually apply the redaction definitions to the document.
Declaration
public Task<RemoteWorkFile> CreateRedactionsAsync(RemoteWorkFile sourceDocument, IEnumerable<RedactionMatchRule> rules)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoteWorkFile | sourceDocument | Source document the redactions should be created for. |
| IEnumerable<RedactionMatchRule> | rules | Rules defining what content in the document should have a redaction region created for it. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the created markup JSON file. |
CreateRedactionsAsync(String, IEnumerable<RedactionMatchRule>)
Automatically create redaction definitions for a document and a given set of text-matching rules, producing a new markup JSON file that can be used in a subsequent operation to actually apply the redaction definitions to the document.
Declaration
public Task<RemoteWorkFile> CreateRedactionsAsync(string localFilePath, IEnumerable<RedactionMatchRule> rules)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to use as the source document for which redactions should be created. |
| IEnumerable<RedactionMatchRule> | rules | Rules defining what content in the document should have a redaction region created for it. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the created markup JSON file. |
OcrToPdfAsync(ConversionSourceDocument)
Perform OCR on pages of a single source document, producing a PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> OcrToPdfAsync(ConversionSourceDocument sourceDocument)
Parameters
| Type | Name | Description |
|---|---|---|
| ConversionSourceDocument | sourceDocument | Information about the source document to use as input. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
OcrToPdfAsync(ConversionSourceDocument, OcrOptions)
Perform OCR on pages of a single source document, producing a PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> OcrToPdfAsync(ConversionSourceDocument sourceDocument, OcrOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| ConversionSourceDocument | sourceDocument | Information about the source document to use as input. |
| OcrOptions | options | OCR options. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
OcrToPdfAsync(IEnumerable<ConversionSourceDocument>)
Perform OCR on pages from a collection of source documents, producing a PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> OcrToPdfAsync(IEnumerable<ConversionSourceDocument> sourceDocuments)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ConversionSourceDocument> | sourceDocuments | Collection of source documents whose pages should be combined, in order, to form the output. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
OcrToPdfAsync(IEnumerable<ConversionSourceDocument>, OcrOptions)
Perform OCR on pages from a collection of source documents, producing a PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> OcrToPdfAsync(IEnumerable<ConversionSourceDocument> sourceDocuments, OcrOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ConversionSourceDocument> | sourceDocuments | Collection of source documents whose pages should be combined, in order, to form the output. |
| OcrOptions | options | OCR options. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
OcrToPdfAsync(String)
Perform OCR on a local file, producing a searchable PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> OcrToPdfAsync(string localFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to use as input. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
OcrToPdfAsync(String, OcrOptions)
Perform OCR on a local file, producing a searchable PDF.
Convenience wrapper for ConvertAsync(IEnumerable<ConversionSourceDocument>, DestinationOptions), returning a single ConversionResult.
Declaration
public Task<ConversionResult> OcrToPdfAsync(string localFilePath, OcrOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to use as input. |
| OcrOptions | options | OCR options. |
Returns
| Type | Description |
|---|---|
| Task<ConversionResult> | ConversionResult for the created PDF. |
See Also
RedactToPlainTextAsync(RemoteWorkFile, RemoteWorkFile, String)
Applies redactions in a markup JSON file to a document, producing a new redacted plain text file.
Note that redaction options (like redaction reason, border
color, fill color, etc.) are not used by PrizmDoc Server when
redacting to plain text. Instead, PrizmDoc Server will simply
indicate when a portion of a line was redacted with the string
"<Text Redacted>".
Declaration
public Task<RemoteWorkFile> RedactToPlainTextAsync(RemoteWorkFile sourceDocument, RemoteWorkFile markupJson, string outputLineEndingFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoteWorkFile | sourceDocument | Existing RemoteWorkFile to use as the source document. |
| RemoteWorkFile | markupJson | Existing RemoteWorkFile containing the markup JSON you want burned into the source document. |
| String | outputLineEndingFormat | Line ending to use in the output plain
text file, such as |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new plain text file. |
RedactToPlainTextAsync(RemoteWorkFile, String, String)
Applies redactions in a markup JSON file to a document, producing a new redacted plain text file.
Note that redaction options (like redaction reason, border
color, fill color, etc.) are not used by PrizmDoc Server when
redacting to plain text. Instead, PrizmDoc Server will simply
indicate when a portion of a line was redacted with the string
"<Text Redacted>".
Declaration
public Task<RemoteWorkFile> RedactToPlainTextAsync(RemoteWorkFile sourceDocument, string localFilePathToMarkupJson, string outputLineEndingFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| RemoteWorkFile | sourceDocument | Existing RemoteWorkFile to use as the source document. |
| String | localFilePathToMarkupJson | Path to a local markup.json file containing the markup you want burned in to the source document. |
| String | outputLineEndingFormat | Line ending to use in the
output plain text file, such as |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new plain text file. |
RedactToPlainTextAsync(String, RemoteWorkFile, String)
Applies redactions in a markup JSON file to a document, producing a new redacted plain text file.
Note that redaction options (like redaction reason, border
color, fill color, etc.) are not used by PrizmDoc Server when
redacting to plain text. Instead, PrizmDoc Server will simply
indicate when a portion of a line was redacted with the string
"<Text Redacted>".
Declaration
public Task<RemoteWorkFile> RedactToPlainTextAsync(string localFilePathToSourceDocument, RemoteWorkFile markupJson, string outputLineEndingFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePathToSourceDocument | Path to a local file to use as the source document. |
| RemoteWorkFile | markupJson | Existing RemoteWorkFile containing the markup JSON you want burned into the source document. |
| String | outputLineEndingFormat | Line ending to use in the
output plain text file, such as |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new plain text file. |
RedactToPlainTextAsync(String, String, String)
Applies redactions in a markup JSON file to a document, producing a new redacted plain text file.
Note that redaction options (like redaction reason, border
color, fill color, etc.) are not used by PrizmDoc Server when
redacting to plain text. Instead, PrizmDoc Server will simply
indicate when a portion of a line was redacted with the string
"<Text Redacted>".
Declaration
public Task<RemoteWorkFile> RedactToPlainTextAsync(string localFilePathToSourceDocument, string localFilePathToMarkupJson, string outputLineEndingFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePathToSourceDocument | Path to a local file to use as the source document. |
| String | localFilePathToMarkupJson | Path to a local markup.json file containing the redactions you want burned in to the source document. |
| String | outputLineEndingFormat | Line ending to use in the
output plain text file, such as |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile for the new plain text file. |
UploadAsync(Stream, String, String)
Uploads a stream of bytes to PrizmDoc Server, creating a remote work file which can be used as input to document processing operations.
Declaration
public Task<RemoteWorkFile> UploadAsync(Stream stream, string fileExtension = "txt", string affinityToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | Stream of bytes for the file to upload. |
| String | fileExtension | File extension for the stream of bytes being uploaded. For plain text formats, this can influence how PrizmDoc Server will render the file. |
| String | affinityToken | Optional affinity token defining which remote PrizmDoc Server this file should be uploaded to. This is an advanced option that you do not need to use. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile instance which can be used as input to other document processing methods. |
UploadAsync(String, String)
Uploads a local file to PrizmDoc Server, creating a remote work file which can be used as input to document processing operations.
Declaration
public Task<RemoteWorkFile> UploadAsync(string localFilePath, string affinityToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | localFilePath | Path to a local file to upload. |
| String | affinityToken | Optional affinity token defining which remote PrizmDoc Server this file should be uploaded to. This is an advanced option that you do not need to use. |
Returns
| Type | Description |
|---|---|
| Task<RemoteWorkFile> | RemoteWorkFile instance which can be used as input to other document processing methods. |