Documentize Namespace

Classes

Class NameDescription
AddTimestampOptionsRepresents Add Timestamp Options for Documentize.Timestamp plugin.
CompressOptionsRepresents Compress options for Documentize.Optimizer plugin.
DecryptionOptionsRepresents Decryption Options for Documentize.Security plugin.
DirectoryDataSourceRepresents directory data for load and save operations of a plugin.
DocConverterRepresents Documentize.DocConverter plugin. Used to convert PDF documents into DOC/DOCX format.
EncryptionOptionsRepresents Encryption Options for Documentize.Security plugin.
FileDataSourceRepresents file data for load and save operations of a plugin.
FileResultRepresents operation result in the form of string path to file.
FormExportToDsvOptionsRepresents options for export values of fields for Documentize.FormExporter plugin.
FormExporterRepresents Documentize.FormExporter plugin. Used to Export Form values of PDF documents to DSV or CSV file.
FormFlattenerRepresents Documentize.FormFlattener plugin. Used to Flatten fields in PDF documents.
FormFlattenerOptionsRepresents options for Flatten Fields in document by Documentize.FormFlattener plugin.
HtmlConverterRepresents Documentize.HtmlConverter plugin. Used to convert PDF documents into HTML format and HTML documents into PDF format.
HtmlToPdfOptionsRepresents HTML to PDF converter options for Documentize.HtmlConverter plugin.
ImageExtractorRepresents Documentize.ImageExtractor plugin. Used to extract images from PDF documents.
ImageExtractorOptionsRepresents images extraction options for the Documentize.ImageExtractor plugin.
InfoThe class provides information about current product build.
JpegConverterRepresents Documentize.JpegConverter plugin. Used to convert PDF documents into JPEG format.
LicenseProvides method to set License.
MergeOptionsRepresents Merge options for Documentize.Merger plugin.
MergerRepresents Documentize.Merger plugin. Used to merge multiple PDF documents into a single PDF.
MessageA chat completion message generated by the model.
ObjectResultRepresents operation result in the form of string.
OptimizeOptionsRepresents Optimize options for Documentize.Optimizer plugin.
OptimizerRepresents Documentize.Optimizer plugin. Used to Optimize, Rotate, Resize, Compress PDF documents.
PageInfoRepresents the page information.
PageSizeClass representing size of page in PDF document.
PdfAConvertOptionsRepresents options for converting PDF documents to PDF/A format with the Documentize.PdfAConverter plugin.
PdfAConverterRepresents a plugin for handling the conversion of PDF documents in a PDF/A format and for validation of the PDF/A conformance.
PdfAOptionsBaseRepresents the base class for the Documentize.PdfAConverter plugin options. This class provides properties and methods for configuring the PDF/A conversion and validation process.
PdfAValidateOptionsRepresents options for validating PDF/A compliance of PDF documents with the Documentize.PdfAConverter plugin.
PdfAValidationResultRepresents the result of a PDF/A validation process.
PdfChatGptRepresents PdfChatGpt plugin.
PdfChatGptOptionsRepresents options for Documentize.PdfChatGpt plugin.
PdfChatGptRequestOptionsRepresents options for Documentize.PdfChatGpt plugin.
PdfConverterOptionsRepresents options for Pdf converter plugins.
PdfToDocOptionsRepresents PDF to DOC converter options for Documentize.DocConverter plugin.
PdfToHtmlOptionsRepresents PDF to HTML converter options for Documentize.HtmlConverter plugin.
PdfToJpegOptionsRepresents PDF to JPEG converter options for the Documentize.JpegConverter plugin.
PdfToPngOptionsRepresents PDF to PNG converter options for the Documentize.PngConverter plugin.
PdfToTiffOptionsRepresents PDF to TIFF converter options for the Documentize.TiffConverter plugin.
PdfToXlsOptionsRepresents PDF to XLS/XLSX converter options for Documentize.XlsConverter plugin.
PluginBaseOptionsRepresents base options for plugins.
PngConverterRepresents Documentize.PngConverter plugin. Used to convert PDF documents into PNG format.
RectangleClass represents rectangle.
ResizeOptionsRepresents Resize options for Documentize.Optimizer plugin.
ResultContainerRepresents container that contains the result collection of processing the plugin.
RotateOptionsRepresents Rotate options for Documentize.Optimizer plugin.
SecurityRepresents Documentize.Security plugin. Used to encrypt and decrypt PDF documents.
SignOptionsRepresents Sign Options for Documentize.Signature plugin.
SignatureRepresents Documentize.Signature plugin. Used to Sign PDF documents.
SplitOptionsRepresents Split options for Documentize.Splitter plugin.
SplitterRepresents Documentize.Splitter plugin. Used to Split PDF documents into separate pages.
StreamDataSourceRepresents stream data source for load and save operations of a plugin.
StreamResultRepresents operation result in the form of Stream.
StringResultRepresents operation result in the form of string.
TableBuilderClass represents builder for table in pdf page.
TableCellBuilderClass represents builder for table cell.
TableGeneratorRepresents Documentize.TableGenerator plugin. Used to add a table to a PDF document.
TableOptionsRepresents options for add table to document by Documentize.TableGenerator plugin.
TableRowBuilderClass represents builder for table row.
TextExtractorRepresents Documentize.TextExtractor plugin. Used to extract text from PDF documents.
TextExtractorOptionsRepresents text extraction options for the Documentize.TextExtractor plugin.
TiffConverterRepresents Documentize.TiffConverter plugin. Used to convert PDF documents into TIFF format.
TimestampRepresents Documentize.Timestamp plugin. Used to add Timestamp to a document.
TocGeneratorRepresents Documentize.TocGenerator plugin. Used to add a Table of Contents to PDF documents.
TocHeadingRepresents options for Headings or Titles of Table of Contents to document by Documentize.TocGenerator plugin.
TocOptionsRepresents options for add Table of Contents to document by Documentize.TocGenerator plugin.
XlsConverterRepresents Documentize.XlsConverter plugin. Used to convert PDF documents into XLSX/XLS/CSV/XLSM/ODS formats.

Interfaces

Interface NameDescription
IDataSourceGeneral data interface that defines common members that concrete data should implement.
IOperationResultGeneral operation result interface that defines common methods that concrete plugin operation result should implement.
IPluginOptionsGeneral plugin option interface that defines common methods that concrete plugin option should implement.

Enums

Enum NameDescription
ConvertErrorActionThis class represents action for conversion errors.
ConvertSoftMaskActionThis action represents actions for conversion of images with soft mask.
DataTypeRepresents possible types of data for plugin processing.
DocConversionModeDefines conversion mode of the output document.
PdfToXlsOptions.ExcelFormatAllows to specify xls/xlsx/xml/csv file format. Default value is XLSX.
HtmlMediaTypeSpecifies possible media types used during rendering.
HtmlPageLayoutOptionSpecifies flags that together other options determine sizes and layouts of pages.
PdfAStandardVersionSpecifies the PDF/A standard version for a PDF document.
RoleThe role of the messages author.
RotationEnumeration of possible rotation values.
PdfToHtmlOptions.SaveDataTypeDefines output type of HTML file.
TextFormattingModeDefines different modes which can be used while converting a PDF document into text. See Documentize.TextExtractorOptions class.
TiffColorDepthUsed to specify the Color Depth for the Documentize.PdfToTiffOptions.
TiffCompressionUsed to specify the Compression type for the Documentize.PdfToTiffOptions.

Subsections of Documentize Namespace

Class AddTimestampOptions

Info

Represents Add Timestamp Options for Documentize.Timestamp plugin.

public class AddTimestampOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsAddTimestampOptions

Implements

Inherited Members

Constructors

AddTimestampOptions(Stream, string, string, string)

Initializes a new instance of the Documentize.AddTimestampOptions object with default options.

public AddTimestampOptions(Stream pfx, string password, string serverUrl, string serverBasicAuthCredentials = "")

Parameters

  • pfx Stream: The path to the pfx file.
  • password string: The password to the pfx file.
  • serverUrl string: The timestamp server url.
  • serverBasicAuthCredentials string: The basic authentication credentials, username and password are combined into a string “username:password”. (Optional).

AddTimestampOptions(string, string, string, string)

Initializes a new instance of the Documentize.AddTimestampOptions object with default options.

public AddTimestampOptions(string pfx, string password, string serverUrl, string serverBasicAuthCredentials = "")

Parameters

  • pfx string: The path to the pfx file.
  • password string: The password to the pfx file.
  • serverUrl string: The timestamp server url.
  • serverBasicAuthCredentials string: The basic authentication credentials, username and password are combined into a string “username:password”. (Optional).

Namespace: Documentize Assembly: Documentize.dll

Class CompressOptions

Info

Represents Compress options for Documentize.Optimizer plugin.

public sealed class CompressOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsCompressOptions

Implements

Inherited Members

Constructors

CompressOptions()

Initializes a new instance of the Documentize.CompressOptions object with default options.

public CompressOptions()

Namespace: Documentize Assembly: Documentize.dll

Class DecryptionOptions

Info

Represents Decryption Options for Documentize.Security plugin.

public class DecryptionOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsDecryptionOptions

Implements

Inherited Members

Constructors

DecryptionOptions(string)

Initializes a new instance of the Documentize.DecryptionOptions object with default options.

public DecryptionOptions(string ownerPassword)

Parameters

  • ownerPassword string: Owner password.

Properties

OwnerPassword

Owner password.

public string OwnerPassword { get; set; }

Property Value

string

Namespace: Documentize Assembly: Documentize.dll

Class DirectoryDataSource

Info

Represents directory data for load and save operations of a plugin.

public sealed class DirectoryDataSource : IDataSource

Inheritance

objectDirectoryDataSource

Implements

Inherited Members

Constructors

DirectoryDataSource(string)

Initializes new directory data with the specified path.

public DirectoryDataSource(string path)

Parameters

  • path string: A string representing the path to the directory.

Properties

DataType

Type of data source.

public DataType DataType { get; }

Property Value

DataType

Path

Gets the path to the directory of the current data.

public string Path { get; }

Property Value

string

Namespace: Documentize Assembly: Documentize.dll

Class DocConverter

Info

Represents Documentize.DocConverter plugin. Used to convert PDF documents into DOC/DOCX format.

public static class DocConverter

Inheritance

objectDocConverter

Inherited Members

Examples

The example demonstrates how to convert PDF document to Doc format.

// Create PdfToDocOptions object to set instructions
var options = new PdfToDocOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_file.doc"));
// Perform the process
DocConverter.Process(options);

The example demonstrates how to convert PDF document to Doc format with setting Mode.

// Create PdfToDocOptions object to set instructions
var options = new PdfToDocOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_file.doc"));
// Set Mode
options.Mode = DocConversionMode.Flow;
// Perform the process
DocConverter.Process(options);

Methods

Process(PdfToDocOptions)

Converts PDF document into DOC/DOCX format.

public static ResultContainer Process(PdfToDocOptions options)

Parameters

  • options PdfToDocOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class EncryptionOptions

Info

Represents Encryption Options for Documentize.Security plugin.

public class EncryptionOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsEncryptionOptions

Implements

Inherited Members

Constructors

EncryptionOptions(string, string)

Initializes a new instance of the Documentize.EncryptionOptions object with default options.

public EncryptionOptions(string ownerPassword, string userPassword)

Parameters

  • ownerPassword string: Owner password.
  • userPassword string: User password.

Properties

OwnerPassword

Owner password.

public string OwnerPassword { get; set; }

Property Value

string

UserPassword

User password.

public string UserPassword { get; set; }

Property Value

string

Namespace: Documentize Assembly: Documentize.dll

Class FileDataSource

Info

Represents file data for load and save operations of a plugin.

public sealed class FileDataSource : IDataSource

Inheritance

objectFileDataSource

Implements

Inherited Members

Constructors

FileDataSource(string)

Initializes new file data source with the specified path.

public FileDataSource(string path)

Parameters

  • path string: A string representing the path to the source file.

Properties

DataType

Type of data source.

public DataType DataType { get; }

Property Value

DataType

Path

Gets the path to the file of the current data.

public string Path { get; }

Property Value

string

Namespace: Documentize Assembly: Documentize.dll

Class FileResult

Info

Represents operation result in the form of string path to file.

public sealed class FileResult : IOperationResult

Inheritance

objectFileResult

Implements

Inherited Members

Properties

Data

Gets raw data.

public object Data { get; }

Property Value

object

IsFile

Indicates whether the result is a path to an output file.

public bool IsFile { get; }

Property Value

bool

IsStream

Indicates whether the result is an output stream.

public bool IsStream { get; }

Property Value

bool

IsString

Indicates whether the result is a text string.

public bool IsString { get; }

Property Value

bool

Methods

ToFile()

Tries to convert the result to a file.

public string ToFile()

Returns

string : A string representing the path to the output file if the result is file; otherwise null.

ToStream()

Tries to convert the result to a stream object.

public Stream ToStream()

Returns

Stream : A stream object representing the output data if the result is stream; otherwise null.

Namespace: Documentize Assembly: Documentize.dll

Class FormExporter

Info

Represents Documentize.FormExporter plugin. Used to Export Form values of PDF documents to DSV or CSV file.

public static class FormExporter

Inheritance

objectFormExporter

Inherited Members

Examples

The example demonstrates how to Export Form values to CSV file.

// Create FormExportToDsvOptions object to set instructions
var options = new FormExportToDsvOptions(',', true);
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_csv_file.csv"));
// Perform the process
FormExporter.Process(options);

Methods

Process(FormExportToDsvOptions)

Starts the Documentize.FormExporter processing with the specified parameters.

public static ResultContainer Process(FormExportToDsvOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class FormExportToDsvOptions

Info

Represents options for export values of fields for Documentize.FormExporter plugin.

public sealed class FormExportToDsvOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsFormExportToDsvOptions

Implements

Inherited Members

Constructors

FormExportToDsvOptions(char, bool)

Initializes a new instance of the Documentize.FormExportToDsvOptions object.

public FormExportToDsvOptions(char delimeter = ',', bool addFieldNames = false)

Parameters

  • delimeter char: Specifies the delimeter to use in exported data between values. The default value is ‘,’.
  • addFieldNames bool: Add field name before value. Format: Name + delimeter + Value + delimeter.

Properties

AddFieldName

Add field name before value. Format: Name + delimeter + Value + delimeter.

public bool AddFieldName { get; set; }

Property Value

bool

Delimeter

Delimeter used for exported values.

public char Delimeter { get; set; }

Property Value

char

Namespace: Documentize Assembly: Documentize.dll

Class FormFlattener

Info

Represents Documentize.FormFlattener plugin. Used to Flatten fields in PDF documents.

public static class FormFlattener

Inheritance

objectFormFlattener

Inherited Members

Examples

The example demonstrates how to Flatten fields in PDF file.

// Create FormFlattenerOptions object to set instructions
var options = new FormFlattenerOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
FormFlattener.Process(options);

The example demonstrates how to Flatten fields in PDF file and skip first field.

// Get Fields Names
var fieldNames = FormFlattener.GetFieldNames("path_to_your_pdf_file.pdf");
// Create FormFlattenerOptions object to set instructions
var options = new FormFlattenerOptions();
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Skip 1 field.
options.SkipFields.Add(fieldNames[0]);
// Perform the process
FormFlattener.Process(options);

The example demonstrates how to Get Field Names from PDF file.

// Get Fields Names
var fieldNames = FormFlattener.GetFieldNames("path_to_your_pdf_file.pdf");

Methods

GetFieldNames(string)

Get Field Names in the PDF Document.

public static List<string> GetFieldNames(string path)

Parameters

  • path string: The Path to PDF Document.

Returns

List<string>

List of names in the PDF Document.

GetFieldNames(Stream) : Get Field Names in the PDF Document.

public static List<string> GetFieldNames(Stream stream)

Parameters

  • stream Stream: The Stream with PDF Document.

Returns

List<string>

List of names in the PDF Document.

Process(FormFlattenerOptions) : Flatten Form fields in PDF document.

public static ResultContainer Process(FormFlattenerOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class FormFlattenerOptions

Info

Represents options for Flatten Fields in document by Documentize.FormFlattener plugin.

public class FormFlattenerOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsFormFlattenerOptions

Implements

Inherited Members

Constructors

FormFlattenerOptions()

Initializes a new instance of the Documentize.FormFlattenerOptions object with default options.

public FormFlattenerOptions()

Properties

SkipFields

The List of fields that will not Flatten.

public List<string> SkipFields { get; set; }

Property Value

List<string>

Namespace: Documentize Assembly: Documentize.dll

Class HtmlConverter

Info

Represents Documentize.HtmlConverter plugin. Used to convert PDF documents into HTML format and HTML documents into PDF format.

public static class HtmlConverter

Inheritance

objectHtmlConverter

Inherited Members

Examples

The example demonstrates how to convert PDF to HTML document.

// Create PdfToHtmlOptions object to set output data type as file with embedded resources
var options = new PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
// Add input file path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_output.html"));
//Perform the process
HtmlConverter.Process(options);

The example demonstrates how to convert HTML to PDF document.

// Create HtmlToPdfOptions
var options = new HtmlToPdfOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_input.html"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_output.pdf"));
//Perform the process
HtmlConverter.Process(options);

Methods

Process(PdfToHtmlOptions)

Converts PDF documents into HTML format.

public static ResultContainer Process(PdfToHtmlOptions options)

Parameters

  • options PdfToHtmlOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Process(HtmlToPdfOptions)

Converts HTML documents into PDF format.

public static ResultContainer Process(HtmlToPdfOptions options)

Parameters

  • options HtmlToPdfOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class HtmlToPdfOptions

Info

Represents HTML to PDF converter options for Documentize.HtmlConverter plugin.

public sealed class HtmlToPdfOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsHtmlToPdfOptions

Implements

Inherited Members

Constructors

HtmlToPdfOptions()

Initializes new instance of the Documentize.HtmlToPdfOptions object.

public HtmlToPdfOptions()

Properties

BasePath

The base path/url for the html file.

public string BasePath { get; set; }

Property Value

string

HtmlMediaType

Gets or sets possible media types used during rendering.

public HtmlMediaType HtmlMediaType { get; set; }

Property Value

HtmlMediaType

IsRenderToSinglePage

Gets or sets rendering all document to single page.

public bool IsRenderToSinglePage { get; set; }

Property Value

bool

PageInfo

Gets or sets document page info.

public PageInfo PageInfo { get; set; }

Property Value

PageInfo

PageLayoutOption

Gets or sets layout option.

public HtmlPageLayoutOption PageLayoutOption { get; set; }

Property Value

HtmlPageLayoutOption

Namespace: Documentize Assembly: Documentize.dll

Class ImageExtractor

Info

Represents Documentize.ImageExtractor plugin. Used to extract images from PDF documents.

public static class ImageExtractor

Inheritance

objectImageExtractor

Inherited Members

Examples

The example demonstrates how to extract images from PDF document.

// Create ImageExtractorOptions to set instructions
var options = new ImageExtractorOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_results_directory"));
// Perform the process
var results = ImageExtractor.Process(options);
// Get path to image result
var imageExtracted = results.ResultCollection[0].ToFile();

The example demonstrates how to extract images from PDF document to Streams without folder.

// Create ImageExtractorOptions to set instructions
var options = new ImageExtractorOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Not set output - it will write results to streams
// Perform the process
var results = ImageExtractor.Process(options);
// Get Stream
var ms = results.ResultCollection[0].ToStream();
// Copy data to file for demo
ms.Seek(0, SeekOrigin.Begin);
using (var fs = File.Create("test_file.png"))
{
    ms.CopyTo(fs);
}

Methods

Process(ImageExtractorOptions)

Extract images from PDF document.

public static ResultContainer Process(ImageExtractorOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class ImageExtractorOptions

Info

Represents images extraction options for the Documentize.ImageExtractor plugin.

public sealed class ImageExtractorOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsImageExtractorOptions

Implements

Inherited Members

Constructors

ImageExtractorOptions()

Initializes a new instance of the Documentize.ImageExtractorOptions object with default options.

public ImageExtractorOptions()

Namespace: Documentize Assembly: Documentize.dll

Class Info

Info

The class provides information about current product build.

public static class Info

Inheritance

objectInfo

Inherited Members

Fields

  • AssemblyVersion Assembly Version.

Field Value

string

Product

Product Name.

public const string Product = "Documentize"

Field Value

string

Namespace: Documentize Assembly: Documentize.dll

Class JpegConverter

Info

Represents Documentize.JpegConverter plugin. Used to convert PDF documents into JPEG format.

public static class JpegConverter

Inheritance

objectJpegConverter

Inherited Members

Examples

The example demonstrates how to convert PDF document into JPEG format.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToJpegOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
JpegConverter.Process(options);

The example demonstrates how to convert PDF document into JPEG format with settings for pages, resolution, quality.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToJpegOptions();
// Process only the first page
options.PageList = [1];
// Set output resolution to 200 DPI
options.OutputResolution = 200;
// Set output quality to 50
options.Quality = 50;
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
JpegConverter.Process(options);

The example demonstrates how to convert PDF document into JPEG format to streams.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToJpegOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Perform the process
var results = JpegConverter.Process(options);
// Get stream results
foreach (var result in results.ResultCollection)
{
    var streamResultPage1 = result.ToStream();
}

Methods

Process(PdfToJpegOptions)

Converts PDF document into JPEG format.

public static ResultContainer Process(PdfToJpegOptions options)

Parameters

  • options PdfToJpegOptions: An options object containing instructions for the Documentize.JpegConverter.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class License

Info

Provides method to set License.

public static class License

Inheritance

objectLicense

Inherited Members

Examples

Shows how to activate a license.

// Set License
License.Set("PathToLicense.lic");

Methods

Set(string)

Licenses the component.

public static void Set(string licenseName)

Parameters

  • licenseName string: Can be a full or short file name. Use an empty string to switch to evaluation mode.

Namespace: Documentize Assembly: Documentize.dll

Class MergeOptions

Info

Represents Merge options for Documentize.Merger plugin.

public sealed class MergeOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsMergeOptions

Implements

Inherited Members

Constructors

MergeOptions()

Initializes a new instance of the Documentize.MergeOptions object with default options.

public MergeOptions()

Namespace: Documentize Assembly: Documentize.dll

Class Merger

Info

Represents Documentize.Merger plugin. Used to merge multiple PDF documents into a single PDF.

public static class Merger

Inheritance

objectMerger

Inherited Members

Examples

The example demonstrates how to Merge two PDF documents.

// Create MergeOptions object to set instructions
var options = new MergeOptions();
// Add input file paths
options.AddInput(new FileDataSource("path_to_your_pdf_file_1.pdf"));
options.AddInput(new FileDataSource("path_to_your_pdf_file_2.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Merger.Process(options);

Methods

Process(MergeOptions)

Merge PDF documents.

public static ResultContainer Process(MergeOptions options)

Parameters

  • options MergeOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class Message

Info

A chat completion message generated by the model.

public class Message

Inheritance

objectMessage

Inherited Members

Constructors

Message()

public Message()

Properties

Content

The contents of the message.

[JsonProperty("content")]
public string Content { get; set; }

Property Value

string

Role

Sets or gets the role of the author of this message.

[JsonProperty("role")]
[JsonConverter(typeof(StringEnumConverter), new object[] { true })]
public Role Role { get; set; }

Property Value

Role

Namespace: Documentize Assembly: Documentize.dll

Class ObjectResult

Info

Represents operation result in the form of string.

public sealed class ObjectResult : IOperationResult

Inheritance

objectObjectResult

Implements

Inherited Members

Properties

Data

Gets raw data.

public object Data { get; }

Property Value

object

IsFile

Indicates whether the result is a path to an output file.

public bool IsFile { get; }

Property Value

bool

IsObject

Indicates whether the result is an object.

public bool IsObject { get; }

Property Value

bool

IsStream

Indicates whether the result is a path to an output file.

public bool IsStream { get; }

Property Value

bool

IsString

Indicates whether the result is a string.

public bool IsString { get; }

Property Value

bool

Text

Returns string representation of the result.

public string Text { get; }

Property Value

string

Methods

ToFile()

Tries to convert the result to a file.

public string ToFile()

Returns

string : A string representing the path to the output file if the result is file; otherwise null.

ToStream()

Tries to convert the result to a stream object.

public Stream ToStream()

Returns

Stream : A stream object representing the output data if the result is stream; otherwise null.

ToString()

Tries to convert the result to a string.

public override string ToString()

Returns

string : A string representing the text content if the result is string; otherwise returns base.ToString().

Namespace: Documentize Assembly: Documentize.dll

Class OptimizeOptions

Info

Represents Optimize options for Documentize.Optimizer plugin.

public sealed class OptimizeOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsOptimizeOptions

Implements

Inherited Members

Constructors

OptimizeOptions()

Initializes a new instance of the Documentize.OptimizeOptions object with default options. Linearize the document in order to

  • open the first page as quickly as possible;
  • display next page or follow by link to the next page as quickly as possible;
  • display the page incrementally as it arrives when data for a page is delivered over a slow channel (display the most useful data first);
  • permit user interaction, such as following a link, to be performed even before the entire page has been received and displayed.
public OptimizeOptions()

Namespace: Documentize Assembly: Documentize.dll

Class Optimizer

Info

Represents Documentize.Optimizer plugin. Used to Optimize, Rotate, Resize, Compress PDF documents.

public static class Optimizer

Inheritance

objectOptimizer

Inherited Members

Examples

The example demonstrates how to Optimize PDF document.

// Create OptimizeOptions object to set instructions
var options = new OptimizeOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

The example demonstrates how to Rotate PDF document.

// Create RotateOptions object to set instructions
var options = new RotateOptions();
// Set new Rotation
options.Rotation = Rotation.On90;
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

The example demonstrates how to Resize PDF document.

// Create ResizeOptions object to set instructions
var options = new ResizeOptions();
// Set new PageSize
options.PageSize = PageSize.A3;
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

The example demonstrates how to Compress PDF document.

// Create CompressOptions object to set instructions
var options = new CompressOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Optimizer.Process(options);

Methods

Process(OptimizeOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(OptimizeOptions options)

Parameters

  • options OptimizeOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Process(RotateOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(RotateOptions options)

Parameters

  • options RotateOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Process(ResizeOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(ResizeOptions options)

Parameters

  • options ResizeOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Process(CompressOptions)

Starts the Documentize.Optimizer processing with the specified parameters.

public static ResultContainer Process(CompressOptions options)

Parameters

  • options CompressOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Namespace: Documentize Assembly: Documentize.dll

Class PageInfo

Info

Represents the page information.

public class PageInfo : PageSize

Inheritance

objectPageSizePageInfo

Inherited Members

Constructors

PageInfo()

Constructor of Documentize.PageInfo.

public PageInfo()

PageInfo(double, double)

Constructor of Documentize.PageInfo.

public PageInfo(double width, double height)

Parameters

Properties

MarginBottom

Gets or sets a value that indicates the bottom margin.

public double MarginBottom { get; set; }

Property Value

double

MarginLeft

Gets or sets a value that indicates the left margin.

public double MarginLeft { get; set; }

Property Value

double

MarginRight

Gets or sets a value that indicates the right margin.

public double MarginRight { get; set; }

Property Value

double

MarginTop

Gets or sets a value that indicates the top margin.

public double MarginTop { get; set; }

Property Value

double

Namespace: Documentize Assembly: Documentize.dll

Class PageSize

Info

Class representing size of page in PDF document.

public class PageSize

Inheritance

objectPageSize

Derived

Inherited Members

Constructors

PageSize()

Constructor of Documentize.PageSize. A4 sizes by default.

public PageSize()

PageSize(double, double)

Constructor of Documentize.PageSize.

public PageSize(double width, double height)

Parameters

  • width double: Width of the page.
  • height double: Height of the page.

Properties

A0

A0 size (1189x840 mm).

public static PageSize A0 { get; }

Property Value

PageSize

A1

A1 size (840x594 mm).

public static PageSize A1 { get; }

Property Value

PageSize

A2

A2 size (594x420 mm).

public static PageSize A2 { get; }

Property Value

PageSize

A3

A3 size (420x297 mm).

public static PageSize A3 { get; }

Property Value

PageSize

A4

A4 size (297x210 mm).

public static PageSize A4 { get; }

Property Value

PageSize

A5

A5 size (210x148 mm).

public static PageSize A5 { get; }

Property Value

PageSize

A6

A6 size (148x105 mm).

public static PageSize A6 { get; }

Property Value

PageSize

B5

B5 size (250x176 mm).

public static PageSize B5 { get; }

Property Value

PageSize

Height

Gets or sets page height.

public double Height { get; set; }

Property Value

double

IsLandscape

Gets page orientation. Returns true of this is landscape orientation and false if this is portrait.

public bool IsLandscape { get; }

Property Value

bool

P11x17

11x17 inches format.

public static PageSize P11x17 { get; }

Property Value

PageSize

PageLedger

Ledger size (432x279 mm).

public static PageSize PageLedger { get; }

Property Value

PageSize

Legal size (356x216 mm).

public static PageSize PageLegal { get; }

Property Value

PageSize

PageLetter

Letter size (279x216 mm).

public static PageSize PageLetter { get; }

Property Value

PageSize

Width

Gets or sets page width.

public double Width { get; set; }

Property Value

double

Namespace: Documentize Assembly: Documentize.dll

Class PdfAConverter

Info

Represents a plugin for handling the conversion of PDF documents in a PDF/A format and for validation of the PDF/A conformance.

public static class PdfAConverter

Inheritance

objectPdfAConverter

Inherited Members

Examples

The example demonstrates how to convert the PDF document in a PDF/A format (PDF/A-3b in this case):

// Create the options class to set up the conversion process
var options = new PdfAConvertOptions
{
    PdfAVersion = PdfAStandardVersion.PDF_A_3B
};

// Add the source file
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf")); // replace with your actual file path

// Add the path to save the converted file
options.AddOutput(new FileDataSource("path_to_the_converted_file.pdf"));

// Run the conversion
PdfAConverter.Process(options);

The example demonstrates how to validate the PDF document conformance to PDF/A format (PDF/A-1a in this case):

// Create the options class to set up the validation process
var options = new PdfAValidateOptions
{
    PdfAVersion = PdfAStandardVersion.PDF_A_1A
};

// Add one or more files to be validated
options.AddInput(new FileDataSource("path_to_your_first_pdf_file.pdf")); // replace with your actual file path
options.AddInput(new FileDataSource("path_to_your_second_pdf_file.pdf"));
// add more files as needed

// Run the validation and get results
var resultContainer = PdfAConverter.Process(options);

// Check the resultContainer.ResultCollection property for validation results for each file:
for (var i = 0; i &lt; resultContainer.ResultCollection.Count; i++)
{
    var result = resultContainer.ResultCollection[i];
    var validationResult = (PdfAValidationResult) result.Data;
    var isValid = validationResult.IsValid; // Validation result for the i-th document
}

Methods

Process(PdfAConvertOptions)

Converts PDF document into PDF/A format.

public static ResultContainer Process(PdfAConvertOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Process(PdfAValidateOptions)

Check PDF document for compliance with specified format PDF/A.

public static ResultContainer Process(PdfAValidateOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class PdfAConvertOptions

Info

Represents options for converting PDF documents to PDF/A format with the Documentize.PdfAConverter plugin.

public sealed class PdfAConvertOptions : PdfAOptionsBase, IPluginOptions

Inheritance

objectPdfAOptionsBasePdfAConvertOptions

Implements

Inherited Members

Constructors

PdfAConvertOptions()

public PdfAConvertOptions()

Properties

Outputs

Gets the collection of added targets (file or stream data sources) for saving operation results.

public List<idatasource> Outputs { get; }

Property Value

List<IDataSource>

Methods

AddOutput(IDataSource)

Adds new result save target.

public void AddOutput(IDataSource dataSource)

Parameters

  • dataSource IDataSource: Target (file or stream data source) for saving operation results. :

Namespace: Documentize Assembly: Documentize.dll

Class PdfAOptionsBase

Info

Represents the base class for the Documentize.PdfAConverter plugin options. This class provides properties and methods for configuring the PDF/A conversion and validation process.

Represents the base class for the Documentize.PdfAConverter plugin options. This class provides properties and methods for configuring the PDF/A conversion and validation process.

public abstract class PdfAOptionsBase : IPluginOptions

Inheritance

objectPdfAOptionsBase

Derived

Implements

Inherited Members

Constructors

PdfAOptionsBase()

protected PdfAOptionsBase()

Properties

AlignText

Gets or sets a value indicating whether additional means are necessary to preserve text alignment during the PDF/A conversion process.

public bool AlignText { get; set; }

Property Value

bool

Remarks

When set to true, the conversion process will attempt to restore the original text segment bounds. For the most of the documents there is no need to change this property from the default false value, as the text alignment doesn’t change during the default conversion process.

CheckDifferentNamesInFontDictionaries

Gets the flags that control the PDF/A conversion for cases when the source PDF document doesn’t correspond to the PDF specification.

public bool CheckDifferentNamesInFontDictionaries { get; set; }

Property Value

bool

ErrorAction

Gets or sets the action to be taken for objects that cannot be converted.

public ConvertErrorAction ErrorAction { get; set; }

Property Value

ConvertErrorAction

IccProfileFileName

Gets or sets the filename of the ICC (International Color Consortium) profile to be used for the PDF/A conversion in place of the default one.

public string IccProfileFileName { get; set; }

Property Value

string

Inputs

Gets collection of data sources

public List<idatasource> Inputs { get; }

Property Value

List<IDataSource>

IsLowMemoryMode

Gets or sets a value indicating whether the low memory mode is enabled during the PDF/A conversion process.

public bool IsLowMemoryMode { get; set; }

Property Value

bool

LogOutputSource

Gets or sets the data source for the log output.

public IDataSource LogOutputSource { get; set; }

Property Value

IDataSource

OptimizeFileSize

Gets or sets a value indicating whether to try to reduce the file size during the PDF/A conversion process.

public bool OptimizeFileSize { get; set; }

Property Value

bool

Remarks

When set to true, the conversion process will attempt to minimize the resulting file size. This might affect the conversion process performance.

PdfAVersion

Gets or sets the version of the PDF/A standard to be used for validation or conversion.

public PdfAStandardVersion PdfAVersion { get; set; }

Property Value

PdfAStandardVersion

Remarks

The PDF/A standard version is used to determine the compliance level for PDF/A validation and conversion. If the version is set to Documentize.PdfAStandardVersion.Auto, the system will automatically determine the appropriate PDF/A standard version for validation based on the document metadata. For the PDF/A conversion process the Documentize.PdfAStandardVersion.Auto defaults to the PDF/A-1b standard version.

SoftMaskAction

Gets or sets the action to be taken during the conversion of images with soft masks.

public ConvertSoftMaskAction SoftMaskAction { get; set; }

Property Value

ConvertSoftMaskAction

Methods

AddInput(IDataSource)

Adds new data source to the collection

public void AddInput(IDataSource dataSource)

Parameters

Namespace: Documentize Assembly: Documentize.dll

Class PdfAValidateOptions

Info

Represents options for validating PDF/A compliance of PDF documents with the Documentize.PdfAConverter plugin.

public sealed class PdfAValidateOptions : PdfAOptionsBase, IPluginOptions

Inheritance

objectPdfAOptionsBasePdfAValidateOptions

Implements

Inherited Members

Constructors

PdfAValidateOptions()

public PdfAValidateOptions()

Namespace: Documentize Assembly: Documentize.dll

Class PdfAValidationResult

Info

Represents the result of a PDF/A validation process.

public sealed class PdfAValidationResult

Inheritance

objectPdfAValidationResult

Inherited Members

Fields

  • DataSource Gets the data source that was validated.

Field Value

IDataSource

IsValid

Gets a value indicating whether the validation was successful.

public readonly bool IsValid

Field Value

bool

StandardVersion

Gets the PDF/A standard version used for validation.

public readonly PdfAStandardVersion StandardVersion

Field Value

PdfAStandardVersion

Namespace: Documentize Assembly: Documentize.dll

Class PdfChatGpt

Info

Represents PdfChatGpt plugin.

public sealed class PdfChatGpt : IDisposable

Inheritance

objectPdfChatGpt

Implements

Inherited Members

Examples

The example demonstrates how to use PdfChatGpt plugin by adding messages to the request.

using (var plugin = new PdfChatGpt())
{
    var options = new PdfChatGptRequestOptions();
    options.AddOutput(new FileDataSource("PdfChatGPT_output.pdf")); // Add the output file path.
    options.ApiKey = "Your API key."; // You need to provide the key to access the API.
    options.MaxTokens = 1000; // The maximum number of tokens to generate in the chat completion.

    // Add the request messages.
    options.Messages.Add(new Message
    {
        Content = "You are a helpful assistant.",
        Role = Role.System
    });
    options.Messages.Add(new Message
    {
        Content = "What is the biggest pizza diameter ever made?",
        Role = Role.User
    });

    // Process the request.
    var result = await plugin.ProcessAsync(options);

    var fileResultPath = result.ResultCollection[0].Data;
    var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // The ChatGPT API chat completion object.
}

The example demonstrates how to use PdfChatGpt plugin by adding one message to the request.

using (var plugin = new PdfChatGpt())
{
    var options = new PdfChatGptRequestOptions();
    options.AddOutput(new FileDataSource("PdfChatGPT_output.pdf")); // Add the output file path.
    options.ApiKey = "Your API key."; // You need to provide the key to access the API.
    options.MaxTokens = 1000; // The maximum number of tokens to generate in the chat completion.

    // Add the request message.
    // In this case, the system message with Content = "You are a helpful assistant." is added by default.
    // The role of the query message is "user" by default.
    options.Query = "What is the lowest temperature recorded on the Earth?";

    // Process the request.
    var result = await plugin.ProcessAsync(options);

    var fileResultPath = result.ResultCollection[0].Data;
    var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // The ChatGPT API chat completion object.
}

The example demonstrates how to use PdfChatGpt plugin by adding file(s) as the message source(s).

using (var plugin = new PdfChatGpt())
{
    var options = new PdfChatGptRequestOptions();
    options.AddOutput(new FileDataSource("PdfChatGPT_output.pdf")); // Add the output file path.

    // Add the PDF text source.
    // In case of multiple sources, the text from each document will be added to the request message collection
    // as a separate message with the role "user".
    options.AddInput(new FileDataSource("TextSource.pdf"));

    options.ApiKey = "Your API key."; // You need to provide the key to access the API.
    options.MaxTokens = 1000; // The maximum number of tokens to generate in the chat completion.

    // Add the request message.
    // In this case, the system message with Content = "You are a helpful assistant." is added by default.
    // The role of the query message is "user" by default.
    options.Query = "How many letters in the provided text?";

    // Process the request.
    var result = await plugin.ProcessAsync(options);

    var fileResultPath = result.ResultCollection[0].Data;
    var chatCompletionObject = result.ResultCollection[1].Data as ChatCompletion; // The ChatGPT API chat completion object.
}

Remarks

The Documentize.PdfChatGpt object is used to send requests to ChatGPT directly or by adding PDF file sources and save the reply to the output source.

Constructors

PdfChatGpt()

Initializes a new instance of the Documentize.PdfChatGpt object.

public PdfChatGpt()

Methods

Dispose()

Implementation of IDisposable. In fact, it is not necessary for PdfChatGpt.

public void Dispose()

Process(IPluginOptions)

The method has no synchronous version. Use the ProcessAsync method instead.

public ResultContainer Process(IPluginOptions options)

Parameters

  • options IPluginOptions: An options object containing instructions for the PdfChatGpt.

Returns

ResultContainer : #### Exceptions

NotImplementedException

ProcessAsync(IPluginOptions)

Starts the PdfChatGpt processing with the specified parameters.

public Task<resultcontainer> ProcessAsync(IPluginOptions options)

Parameters

  • options IPluginOptions: An options object containing instructions for the PdfChatGpt.

Returns

Task<ResultContainer>

The task object representing the asynchronous operation.

Exceptions

ArgumentException : InvalidOperationException

SetCancellationToken(CancellationToken)

Sets the cancellation token.

public void SetCancellationToken(CancellationToken cancellationToken)

Parameters

Namespace: Documentize Assembly: Documentize.dll

Class PdfChatGptOptions

Info

Represents options for Documentize.PdfChatGpt plugin.

public class PdfChatGptOptions : IPluginOptions

Inheritance

objectPdfChatGptOptions

Derived

Implements

Inherited Members

Constructors

PdfChatGptOptions()

Initializes a new instance of the Documentize.PdfChatGptOptions object.

public PdfChatGptOptions()

Properties

Inputs

public List<idatasource> Inputs { get; }

Property Value

List<IDataSource>

Outputs

public List<idatasource> Outputs { get; }

Property Value

List<IDataSource>

Methods

AddInput(IDataSource)

Adds new data source to the PdfChatGpt plugin data collection.

public void AddInput(IDataSource dataSource)

Parameters

  • dataSource IDataSource: Data source (file or stream) to add.

AddOutput(IDataSource)

Adds new save data source to the PdfChatGpt plugin data collection.

public void AddOutput(IDataSource saveDataSource)

Parameters

  • saveDataSource IDataSource: Data source (file or stream) for saving operation results. :

Namespace: Documentize Assembly: Documentize.dll

Class PdfChatGptRequestOptions

Info

Represents options for Documentize.PdfChatGpt plugin.

public class PdfChatGptRequestOptions : PdfChatGptOptions, IPluginOptions

Inheritance

objectPdfChatGptOptionsPdfChatGptRequestOptions

Implements

Inherited Members

Constructors

PdfChatGptRequestOptions()

Initializes new instance of the Documentize.PdfChatGptRequestOptions object with default options.

public PdfChatGptRequestOptions()

PdfChatGptRequestOptions(string, string, string, string)

Initializes a new instance of the Documentize.PdfChatGptRequestOptions object with options.

public PdfChatGptRequestOptions(string apiKey, string model, string apiUrl, string query)

Parameters

Properties

ApiKey

Gets or sets the key to access to the ChatGPT API.

public string ApiKey { get; set; }

Property Value

string

ApiUrl

Gets or sets the ChatGPT API URL.

public string ApiUrl { get; set; }

Property Value

string

MaxTokens

Maximum number of tokens in the response. Default value is null, means infinity.

public int? MaxTokens { get; set; }

Property Value

int?

Messages

Gets or sets a collection of the Documentize.Message objects.

public List<message> Messages { get; set; }

Property Value

List<Message>

Model

Sets or gets ID of the model to use.

public string Model { get; set; }

Property Value

string

NumberOfChoices

How many chat completion choices to generate for each input message.

public int NumberOfChoices { get; set; }

Property Value

int

Query

Gets or sets the string request to ChatGPT. If not empty, this is the first message in the collection, that will be sent in the request.

public string Query { get; set; }

Property Value

string

Temperature

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default value is 1.

public double Temperature { get; set; }

Property Value

double

Namespace: Documentize Assembly: Documentize.dll

Class PdfConverterOptions

Info

Represents options for Pdf converter plugins.

public abstract class PdfConverterOptions : IPluginOptions

Inheritance

objectPdfConverterOptions

Derived

Implements

Inherited Members

Properties

Inputs

Returns PdfConverterOptions plugin data collection.

public List<idatasource> Inputs { get; }

Property Value

List<IDataSource>

Outputs

Gets collection of added targets for saving operation results.

public List<idatasource> Outputs { get; }

Property Value

List<IDataSource>

Methods

AddInput(IDataSource)

Adds new data source to the PdfConverter plugin data collection.

public void AddInput(IDataSource dataSource)

Parameters

AddOutput(IDataSource)

Adds new data source to the PdfToXLSXConverterOptions plugin data collection.

public void AddOutput(IDataSource saveDataSource)

Parameters

  • saveDataSource IDataSource: Data source (file or stream) for saving operation results.

Exceptions

NotImplementedException

Namespace: Documentize Assembly: Documentize.dll

Class PdfToDocOptions

Info

Represents PDF to DOC converter options for Documentize.DocConverter plugin.

public sealed class PdfToDocOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsPdfToDocOptions

Implements

Inherited Members

Constructors

PdfToDocOptions()

Initializes a new instance of the Documentize.PdfToDocOptions object with default options.

public PdfToDocOptions()

Properties

Mode

Allows to control how a PDF document is converted into a word processing document.

public DocConversionMode Mode { get; set; }

Property Value

DocConversionMode

Remarks

Use the Documentize.DocConversionMode.TextBox mode when the resulting document is not going to be heavily edited further. Textboxes are easy to modify when there is not a lot to do.

Use the Documentize.DocConversionMode.Flow mode when the output document needs further editing. Paragraphs and text lines in the flow mode allow easy modification of text, but unsupported formatting objects will look worse than in the Documentize.DocConversionMode.TextBox mode.

Namespace: Documentize Assembly: Documentize.dll

Class PdfToHtmlOptions

Info

Represents PDF to HTML converter options for Documentize.HtmlConverter plugin.

public sealed class PdfToHtmlOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsPdfToHtmlOptions

Implements

Inherited Members

Constructors

PdfToHtmlOptions(SaveDataType)

Initializes a new instance of the Documentize.PdfToHtmlOptions object for the specified output data type.

public PdfToHtmlOptions(PdfToHtmlOptions.SaveDataType outputDataType = SaveDataType.FileWithExternalResources)

Parameters

Properties

OutputDataType

Gets output data type.

public PdfToHtmlOptions.SaveDataType OutputDataType { get; }

Property Value

PdfToHtmlOptions.SaveDataType

Namespace: Documentize Assembly: Documentize.dll

Class PdfToJpegOptions

Info

Represents PDF to JPEG converter options for the Documentize.JpegConverter plugin.

public sealed class PdfToJpegOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsPdfToJpegOptions

Implements

Inherited Members

Constructors

PdfToJpegOptions()

Initializes a new instance of the Documentize.PdfToJpegOptions object.

public PdfToJpegOptions()

Properties

OutputResolution

Gets or sets the resolution value of the resulting images.

public int OutputResolution { get; set; }

Property Value

int

PageList

Gets or sets a list of pages for the process.

public List<int> PageList { get; set; }

Property Value

List<int>

Quality

Gets and sets output quality. Specifies the level of compression for an image. The range of useful values for the quality is from 0 to 100. The lower the number specified, the higher the compression and therefore the lower the quality of the image. Zero would give you the lowest quality image and 100 the highest.

public int Quality { get; set; }

Property Value

int

Namespace: Documentize Assembly: Documentize.dll

Class PdfToPngOptions

Info

Represents PDF to PNG converter options for the Documentize.PngConverter plugin.

public sealed class PdfToPngOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsPdfToPngOptions

Implements

Inherited Members

Constructors

PdfToPngOptions()

Initializes a new instance of the Documentize.PdfToPngOptions object.

public PdfToPngOptions()

Properties

OutputResolution

Gets or sets the resolution value of the resulting images.

public int OutputResolution { get; set; }

Property Value

int

PageList

Gets or sets a list of pages for the process.

public List<int> PageList { get; set; }

Property Value

List<int>

Namespace: Documentize Assembly: Documentize.dll

Class PdfToTiffOptions

Info

Represents PDF to TIFF converter options for the Documentize.TiffConverter plugin.

public sealed class PdfToTiffOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsPdfToTiffOptions

Implements

Inherited Members

Constructors

PdfToTiffOptions()

Initializes a new instance of the Documentize.PdfToTiffOptions object.

public PdfToTiffOptions()

Properties

ColorDepth

Gets or sets the color Depth.

public TiffColorDepth ColorDepth { get; set; }

Property Value

TiffColorDepth

Remarks

Default value is Documentize.TiffColorDepth.Format32bpp.

Compression

Gets or sets the type of the Compression.

public TiffCompression Compression { get; set; }

Property Value

TiffCompression

Remarks

Default value is Documentize.TiffCompression.LZW.

MultiPage

Gets and sets flag that allows to save all pages in one multi-page tiff. Default value is false.

public bool MultiPage { get; set; }

Property Value

bool

OutputResolution

Gets or sets the resolution value of the resulting images.

public int OutputResolution { get; set; }

Property Value

int

PageList

Gets or sets a list of pages for the process.

public List<int> PageList { get; set; }

Property Value

List<int>

Namespace: Documentize Assembly: Documentize.dll

Class PdfToXlsOptions

Info

Represents PDF to XLS/XLSX converter options for Documentize.XlsConverter plugin.

public sealed class PdfToXlsOptions : PdfConverterOptions, IPluginOptions

Inheritance

objectPdfConverterOptionsPdfToXlsOptions

Implements

Inherited Members

Constructors

PdfToXlsOptions()

Initializes a new instance of the Documentize.PdfToXlsOptions object with default options.

public PdfToXlsOptions()

Properties

Format

Output format.

public PdfToXlsOptions.ExcelFormat Format { get; set; }

Property Value

PdfToXlsOptions.ExcelFormat

InsertBlankColumnAtFirst

Set true if you need inserting of blank column as the first column of worksheet. Default value is false; it means that blank column will not be inserted.

public bool InsertBlankColumnAtFirst { get; set; }

Property Value

bool

MinimizeTheNumberOfWorksheets

Set true if you need to minimize the number of worksheets in resultant workbook. Default value is false; it means save of each PDF page as separated worksheet.

public bool MinimizeTheNumberOfWorksheets { get; set; }

Property Value

bool

Namespace: Documentize Assembly: Documentize.dll

Class PluginBaseOptions

Info

Represents base options for plugins.

public class PluginBaseOptions : IPluginOptions

Inheritance

objectPluginBaseOptions

Derived

Implements

Inherited Members

Properties

CloseInputStreams

Close input streams after operation completed.

public bool CloseInputStreams { get; set; }

Property Value

bool

CloseOutputStreams

Close output streams after operation completed.

public bool CloseOutputStreams { get; set; }

Property Value

bool

Inputs

Returns Inputs data for operation.

public List<idatasource> Inputs { get; }

Property Value

List<IDataSource>

Outputs

Returns Outputs data for operation.

public List<idatasource> Outputs { get; }

Property Value

List<IDataSource>

Methods

AddInput(IDataSource)

Adds new Data to Inputs.

public void AddInput(IDataSource dataSource)

Parameters

AddOutput(IDataSource)

Adds new Data to Outputs.

public void AddOutput(IDataSource saveDataSource)

Parameters

Namespace: Documentize Assembly: Documentize.dll

Class PngConverter

Info

Represents Documentize.PngConverter plugin. Used to convert PDF documents into PNG format.

public static class PngConverter

Inheritance

objectPngConverter

Inherited Members

Examples

The example demonstrates how to convert PDF document into PNG format.

// Create PdfToPngOptions object to set instructions
var options = new PdfToPngOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
PngConverter.Process(options);

The example demonstrates how to convert 1 page of PDF document into PNG format.

// Create PdfToPngOptions object to set instructions
var options = new PdfToPngOptions()
// Process only the first page
options.PageList = [1];
// Set output resolution to 200 DPI
options.OutputResolution = 200;
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
PngConverter.Process(options);

The example demonstrates how to convert PDF document into PNG format to streams.

// Create PdfToJpegOptions object to set instructions
var options = new PdfToPngOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Perform the process
var results = PngConverter.Process(options);
// Get stream results
foreach (var result in results.ResultCollection)
{
    var streamResultPage1 = result.ToStream();
}

Methods

Process(PdfToPngOptions)

Converts PDF document into PNG format.

public static ResultContainer Process(PdfToPngOptions options)

Parameters

  • options PdfToPngOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class Rectangle

Info

Class represents rectangle.

public class Rectangle

Inheritance

objectRectangle

Inherited Members

Constructors

Rectangle(double, double, double, double)

Constructor of Rectangle.

public Rectangle(double llx, double lly, double urx, double ury)

Parameters

  • llx double: X of lower left corner.
  • lly double: Y of lower left corner.
  • urx double: X of upper right corner.
  • ury double: Y of upper right corner.

Namespace: Documentize Assembly: Documentize.dll

Class ResizeOptions

Info

Represents Resize options for Documentize.Optimizer plugin.

public sealed class ResizeOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsResizeOptions

Implements

Inherited Members

Constructors

ResizeOptions()

Initializes a new instance of the Documentize.ResizeOptions object with default options.

public ResizeOptions()

Properties

PageSize

Gets or sets new page size.

public PageSize PageSize { get; set; }

Property Value

PageSize

Namespace: Documentize Assembly: Documentize.dll

Class ResultContainer

Info

Represents container that contains the result collection of processing the plugin.

public class ResultContainer

Inheritance

objectResultContainer

Inherited Members

Properties

ResultCollection

Gets collection of the operation results

public List<ioperationresult> ResultCollection { get; }

Property Value

List<IOperationResult>

Namespace: Documentize Assembly: Documentize.dll

Class RotateOptions

Info

Represents Rotate options for Documentize.Optimizer plugin.

public sealed class RotateOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsRotateOptions

Implements

Inherited Members

Constructors

RotateOptions()

Initializes a new instance of the Documentize.RotateOptions object with default options.

public RotateOptions()

Properties

Rotation

Gets or sets new pages rotation.

public Rotation Rotation { get; set; }

Property Value

Rotation

Namespace: Documentize Assembly: Documentize.dll

Class Security

Info

Represents Documentize.Security plugin. Used to encrypt and decrypt PDF documents.

public static class Security

Inheritance

objectSecurity

Inherited Members

Examples

The example demonstrates how to encrypt PDF document.

// Create EncryptionOptions object to set instructions
var options = new EncryptionOptions("123456", "qwerty");
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Security.Process(options);

The example demonstrates how to decrypt PDF document.

// Create DecryptionOptions object to set instructions
var options = new DecryptionOptions("123456");
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Security.Process(options);

Methods

Process(EncryptionOptions)

Encrypt PDF Document.

public static ResultContainer Process(EncryptionOptions options)

Parameters

  • options EncryptionOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Process(DecryptionOptions)

Decrypt PDF Document.

public static ResultContainer Process(DecryptionOptions options)

Parameters

  • options DecryptionOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class Signature

Info

Represents Documentize.Signature plugin. Used to Sign PDF documents.

public static class Signature

Inheritance

objectSignature

Inherited Members

Examples

The example demonstrates how to sign PDF document.

// Create SignOptions object to set instructions
var options = new SignOptions("path_to_your_pfx_file.pfx", "password_of_your_pfx_file");
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Signature.Process(options);

The example demonstrates how to sign PDF document with Stream of PFX File.

using var pfxStream = File.OpenRead(@"path_to_your_pfx_file.pfx");
var options = new SignOptions(pfxStream, "password_of_your_pfx_file");
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Signature.Process(options);

The example demonstrates how to sign PDF document with invisible signature.

var options = new SignOptions("path_to_your_pfx_file.pfx", "password_of_your_pfx_file");
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Configure invisible signature
signOptions.Visible = false;
// Perform the process
Signature.Process(options);

The example demonstrates how to sign PDF document with extra options.

// Create SignOptions object to set instructions
var options = new SignOptions("path_to_your_pfx_file.pfx", "password_of_your_pfx_file");
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Optional parameters
options.Reason = "my Reason";
options.Contact = "my Contact";
options.Location = "my Location";
options.PageNumber = 3;
// Perform the process
Signature.Process(options);

Methods

Process(SignOptions)

Sign PDF document.

public static ResultContainer Process(SignOptions options)

Parameters

  • options SignOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class SignOptions

Info

Represents Sign Options for Documentize.Signature plugin.

public sealed class SignOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsSignOptions

Implements

Inherited Members

Constructors

SignOptions(string, string)

Initializes a new instance of the Documentize.SignOptions object with default options.

public SignOptions(string pfx, string password)

Parameters

  • pfx string: The path to the pfx file.
  • password string: The password to the pfx file.

SignOptions(Stream, string)

Initializes a new instance of the Documentize.SignOptions object with default options.

public SignOptions(Stream pfx, string password)

Parameters

  • pfx Stream: The stream with the pfx file.
  • password string: The password to the pfx file.

Properties

Contact

The contact of signature.

public string Contact { get; set; }

Property Value

string

Location

The location of signature.

public string Location { get; set; }

Property Value

string

Name

The name of existing signature field. Null to create a new field.

public string Name { get; set; }

Property Value

string

PageNumber

The page number on which signature is made.

public int PageNumber { get; set; }

Property Value

int

Reason

The reason of signature.

public string Reason { get; set; }

Property Value

string

Rectangle

The rect of signature.

public Rectangle Rectangle { get; set; }

Property Value

Rectangle

Visible

The visiblity of signature.

public bool Visible { get; set; }

Property Value

bool

Namespace: Documentize Assembly: Documentize.dll

Class SplitOptions

Info

Represents Split options for Documentize.Splitter plugin.

public sealed class SplitOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsSplitOptions

Implements

Inherited Members

Constructors

SplitOptions()

Initializes a new instance of the Documentize.SplitOptions object with default options.

public SplitOptions()

Namespace: Documentize Assembly: Documentize.dll

Class Splitter

Info

Represents Documentize.Splitter plugin. Used to Split PDF documents into separate pages.

public static class Splitter

Inheritance

objectSplitter

Inherited Members

Examples

The example demonstrates how to Split PDF document.

// Create SplitOptions object to set instructions
var options = new SplitOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file paths
options.AddOutput(new FileDataSource("path_to_result_pdf_file_1.pdf"));
options.AddOutput(new FileDataSource("path_to_result_pdf_file_2.pdf"));
// Perform the process
Splitter.Process(options);

Methods

Process(SplitOptions)

Split PDF document by pages.

public static ResultContainer Process(SplitOptions options)

Parameters

  • options SplitOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class StreamDataSource

Info

Represents stream data source for load and save operations of a plugin.

public sealed class StreamDataSource : IDataSource

Inheritance

objectStreamDataSource

Implements

Inherited Members

Constructors

StreamDataSource(Stream)

Initializes new stream data source with the specified stream object.

public StreamDataSource(Stream data)

Parameters

Properties

Data

Gets the stream object of the current data source.

public Stream Data { get; }

Property Value

Stream

DataType

Type of data source (stream).

public DataType DataType { get; }

Property Value

DataType

Namespace: Documentize Assembly: Documentize.dll

Class StreamResult

Info

Represents operation result in the form of Stream.

public sealed class StreamResult : IOperationResult

Inheritance

objectStreamResult

Implements

Inherited Members

Properties

Data

Gets raw data.

public object Data { get; }

Property Value

object

IsFile

Indicates whether the result is a path to an output file.

public bool IsFile { get; }

Property Value

bool

IsStream

Indicates whether the result is a path to an output file.

public bool IsStream { get; }

Property Value

bool

IsString

Indicates whether the result is a string.

public bool IsString { get; }

Property Value

bool

Methods

ToFile()

Tries to convert the result to a file.

public string ToFile()

Returns

string : A string representing the path to the output file if the result is file; otherwise null.

ToStream()

Tries to convert the result to a stream object.

public Stream ToStream()

Returns

Stream : A stream object representing the output data if the result is stream; otherwise null.

Namespace: Documentize Assembly: Documentize.dll

Class StringResult

Info

Represents operation result in the form of string.

public sealed class StringResult : IOperationResult

Inheritance

objectStringResult

Implements

Inherited Members

Properties

Data

Gets raw data.

public object Data { get; }

Property Value

object

IsFile

Indicates whether the result is a path to an output file.

public bool IsFile { get; }

Property Value

bool

IsStream

Indicates whether the result is a path to an output file.

public bool IsStream { get; }

Property Value

bool

IsString

Indicates whether the result is a string.

public bool IsString { get; }

Property Value

bool

Text

Returns string representation of the result.

public string Text { get; }

Property Value

string

Methods

ToFile()

Tries to convert the result to a file.

public string ToFile()

Returns

string : A string representing the path to the output file if the result is file; otherwise null.

ToStream()

Tries to convert the result to a stream object.

public Stream ToStream()

Returns

Stream : A stream object representing the output data if the result is stream; otherwise null.

ToString()

Tries to convert the result to a string.

public override string ToString()

Returns

string : A string representing the text content if the result is string; otherwise returns base.ToString().

Namespace: Documentize Assembly: Documentize.dll

Class TableBuilder

Info

Class represents builder for table in pdf page.

public class TableBuilder

Inheritance

objectTableBuilder

Derived

Inherited Members

Methods

AddRow()

Add new row to table.

public virtual TableRowBuilder AddRow()

Returns

TableRowBuilder : Instance of current Documentize.TableRowBuilder.

AddTable()

Add new table to document.

public TableBuilder AddTable()

Returns

TableBuilder : Instance of current Documentize.TableBuilder.

InsertPageAfter(int)

Insert page after specified page.

public TableOptions InsertPageAfter(int page)

Parameters

  • page int: Page number to insert table after.

Returns

TableOptions : Instance of current Documentize.TableOptions.

InsertPageBefore(int)

Insert page before specified page.

public TableOptions InsertPageBefore(int page)

Parameters

  • page int: Page number to insert table after.

Returns

TableOptions : Instance of current Documentize.TableOptions.

Operators

implicit operator TableOptions(TableBuilder)

Converts builder Documentize.TableBuilder to options Documentize.TableOptions

public static implicit operator TableOptions(TableBuilder builder)

Parameters

  • builder TableBuilder: Instance of current Documentize.TableBuilder.

Returns

TableOptions : Result of conversion to PdfGeneratorTableOptions.

Namespace: Documentize Assembly: Documentize.dll

Class TableCellBuilder

Info

Class represents builder for table cell.

public class TableCellBuilder : TableRowBuilder

Inheritance

objectTableBuilderTableRowBuilderTableCellBuilder

Inherited Members

Methods

AddCell()

Add cell to table.

public override TableCellBuilder AddCell()

Returns

TableCellBuilder : Instance of current Documentize.TableCellBuilder.

AddParagraph(params string[])

Add paragraphs to table cell.

public TableCellBuilder AddParagraph(params string[] paragraphs)

Parameters

  • paragraphs string[]: Text for Paragraphs.

Returns

TableCellBuilder : Instance of current Documentize.TableCellBuilder.

Namespace: Documentize Assembly: Documentize.dll

Class TableGenerator

Info

Represents Documentize.TableGenerator plugin. Used to add a table to a PDF document.

public sealed class TableGenerator

Inheritance

objectTableGenerator

Inherited Members

Examples

The example demonstrates how to add table to PDF file.

// Initialize the TableGenerator
var plugin = new TableGenerator();
// Configure table options
var options = new TableOptions().InsertPageBefore(1)
   .AddTable()
        .AddRow()
            .AddCell().AddParagraph("Name")
            .AddCell().AddParagraph("Age")
        .AddRow()
            .AddCell().AddParagraph("Bob")
            .AddCell().AddParagraph("12")
        .AddRow()
            .AddCell().AddParagraph("Sam")
            .AddCell().AddParagraph("20")
        .AddRow()
            .AddCell().AddParagraph("Sandy")
            .AddCell().AddParagraph("26")
        .AddRow()
            .AddCell().AddParagraph("Tom")
            .AddCell().AddParagraph("12")
        .AddRow()
            .AddCell().AddParagraph("Jim")
            .AddCell().AddParagraph("27");
// Add input file path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_output.pdf"));
// Perform the process
plugin.Process(options);

Constructors

TableGenerator()

public TableGenerator()

Methods

Process(TableOptions)

Add table to PDF document.

public ResultContainer Process(TableOptions options)

Parameters

  • options TableOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class TableOptions

Info

Represents options for add table to document by Documentize.TableGenerator plugin.

public sealed class TableOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsTableOptions

Implements

Inherited Members

Constructors

TableOptions()

Initializes a new instance of the Documentize.TableOptions object with default options.

public TableOptions()

Methods

AddTable()

Adding table to document.

public TableBuilder AddTable()

Returns

TableBuilder : New instance of Documentize.TableBuilder.

Create()

Create instance of Documentize.TableOptions.

public static TableOptions Create()

Returns

TableOptions : New instance of Documentize.TableOptions.

InsertPageAfter(int)

Insert page after specified page.

public TableOptions InsertPageAfter(int page)

Parameters

  • page int: Page number to insert table after.

Returns

TableOptions : Instance of current Documentize.TableOptions.

InsertPageBefore(int)

Insert page before specified page.

public TableOptions InsertPageBefore(int page)

Parameters

  • page int: Page number to insert table after.

Returns

TableOptions : Instance of current Documentize.TableOptions.

Namespace: Documentize Assembly: Documentize.dll

Class TableRowBuilder

Info

Class represents builder for table row.

public class TableRowBuilder : TableBuilder

Inheritance

objectTableBuilderTableRowBuilder

Derived

Inherited Members

Methods

AddCell()

Add cell to table row.

public virtual TableCellBuilder AddCell()

Returns

TableCellBuilder : Instance of created Documentize.TableCellBuilder.

AddRow()

Overriding AddRow.

public override TableRowBuilder AddRow()

Returns

TableRowBuilder : Instance of current Documentize.TableRowBuilder.

Namespace: Documentize Assembly: Documentize.dll

Class TextExtractor

Info

Represents Documentize.TextExtractor plugin. Used to extract text from PDF documents.

public static class TextExtractor

Inheritance

objectTextExtractor

Inherited Members

Examples

The example demonstrates how to extract text content of PDF document.

// Create TextExtractorOptions object to set instructions
var options = new TextExtractorOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Perform the process
var results = TextExtractor.Process(options);
// Get the extracted text from the ResultContainer object
var textExtracted = results.ResultCollection[0].ToString();

The example demonstrates how to extract text content of PDF document with TextFormattingMode.

// Create TextExtractorOptions object to set TextFormattingMode
var options = new TextExtractorOptions(TextFormattingMode.Pure);
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Perform the process
var results = TextExtractor.Process(options);
// Get the extracted text from the ResultContainer object
var textExtracted = results.ResultCollection[0].ToString();

Methods

Process(TextExtractorOptions)

Extract text from PDF document.

public static ResultContainer Process(TextExtractorOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the extraction.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class TextExtractorOptions

Info

Represents text extraction options for the Documentize.TextExtractor plugin.

public sealed class TextExtractorOptions

Inheritance

objectTextExtractorOptions

Inherited Members

Constructors

TextExtractorOptions(TextFormattingMode)

Initializes a new instance of the Documentize.TextExtractorOptions object for the specified text formatting mode.

public TextExtractorOptions(TextFormattingMode formattingMode = TextFormattingMode.Raw)

Parameters

Properties

FormattingMode

Gets formatting mode.

public TextFormattingMode FormattingMode { get; set; }

Property Value

TextFormattingMode

Inputs

Returns Inputs data for operation.

public List<idatasource> Inputs { get; }

Property Value

List<IDataSource>

Methods

AddInput(IDataSource)

Adds new Data to Inputs.

public void AddInput(IDataSource dataSource)

Parameters

Namespace: Documentize Assembly: Documentize.dll

Class TiffConverter

Info

Represents Documentize.TiffConverter plugin. Used to convert PDF documents into TIFF format.

public static class TiffConverter

Inheritance

objectTiffConverter

Inherited Members

Examples

The example demonstrates how to convert PDF document into TIFF format.

// Create PdfToTiffOptions object to set instructions
var options = new PdfToTiffOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Perform the process
TiffConverter.Process(options);

The example demonstrates how to convert PDF document into TIFF format with Customizing Pages and DPI.

// Create PdfToTiffOptions object to set instructions
var options = new PdfToTiffOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Set Pages
options.PageList = [1, 3];
// Set result image Resolution
options.OutputResolution = 400;
// Perform the process
TiffConverter.Process(options);

The example demonstrates how to convert PDF document into TIFF as Multi-Page.

// Create PdfToTiffOptions object to set instructions
var options = new PdfToTiffOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Enable Multi-Page TIFF output
options.MultiPage = true;
// Perform the process
TiffConverter.Process(options);

The example demonstrates how to convert PDF document into TIFF format with Customizing Compression and ColorDepth.

// Create PdfToTiffOptions object to set instructions
var options = new PdfToTiffOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output Directory path
options.AddOutput(new DirectoryDataSource("path_to_output_directory"));
// Set Compression and ColorDepth
options.Compression = TiffCompression.RLE;
options.ColorDepth = TiffColorDepth.Format24bpp;
// Perform the process
TiffConverter.Process(options);

The example demonstrates how to convert PDF document into TIFF format to streams.

// Create PdfToTiffOptions object to set instructions
var options = new PdfToTiffOptions();
// Add input File path
options.AddInput(new FileDataSource("path_to_input.pdf"));
// Perform the process
var results = TiffConverter.Process(options);
// Get stream results
foreach (var result in results.ResultCollection)
{
    var streamResultPage1 = result.ToStream();
}

Methods

Process(PdfToTiffOptions)

Converts PDF document into TIFF format.

public static ResultContainer Process(PdfToTiffOptions options)

Parameters

  • options PdfToTiffOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Class Timestamp

Info

Represents Documentize.Timestamp plugin. Used to add Timestamp to a document.

public static class Timestamp

Inheritance

objectTimestamp

Inherited Members

Examples

The example demonstrates how to add Timestamp to the document.

// Create AddTimestampOptions object to set instructions
var options = new AddTimestampOptions("path_to_your_pfx_file.pfx", "password_for_your_pfx_file", "timestamp_server_url");
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
Timestamp.Process(options);

Methods

Process(AddTimestampOptions)

Starts the Documentize.Timestamp processing with the specified parameters.

public static ResultContainer Process(AddTimestampOptions options)

Parameters

Returns

ResultContainer : An object containing the result of the operation.

Namespace: Documentize Assembly: Documentize.dll

Class TocGenerator

Info

Represents Documentize.TocGenerator plugin. Used to add a Table of Contents to PDF documents.

public static class TocGenerator

Inheritance

objectTocGenerator

Inherited Members

Examples

The example demonstrates how to add Table of Contents to PDF file.

// Create TocOptions object to set instructions
var options = new TocOptions();
// Set the Title
options.Title = "My Table of Contents";
// Design Headings
options.Headings.Add(new TocHeading("Introduction", 2));
options.Headings.Add(new TocHeading("Chapter I", 3));
options.Headings.Add(new TocHeading("Chapter II", 4));
options.Headings.Add(new TocHeading("Chapter III", 5));
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
TocGenerator.Process(options);

The example demonstrates how to add Table of Contents to PDF file with generating bookmarks.

// Create TocOptions object to set instructions
var options = new TocOptions();
// Set the Title
options.Title = "My Table of Contents";
// Generate links in bookmarks
options.GenerateBookmarks = true;
// Design Headings
options.Headings.Add(new TocHeading("Introduction", 2, false, 1));
options.Headings.Add(new TocHeading("Chapter I", 3, true, 1));
options.Headings.Add(new TocHeading("Chapter II", 4, true, 1));
options.Headings.Add(new TocHeading("Example A", 4, true, 2));
options.Headings.Add(new TocHeading("Example B", 4, true, 2));
options.Headings.Add(new TocHeading("Example C", 4, true, 2));
options.Headings.Add(new TocHeading("Example D", 4, true, 2));
options.Headings.Add(new TocHeading("Chapter III", 5, true, 1));
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_pdf_file.pdf"));
// Perform the process
TocGenerator.Process(options);

The example demonstrates how to add Table of Contents to PDF file and save as stream.

// Create TocOptions object to set instructions
var options = new TocOptions();
// Set the Title
options.Title = "My Table of Contents";
// Design Headings
options.Headings.Add(new TocHeading("Introduction", 2, false, 1));
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output stream 
var outputStream = new MemoryStream();
options.AddOutput(new StreamDataSource(outputStream));
options.CloseOutputStreams = false;
// Perform the process
TocGenerator.Process(options);

Methods

Process(TocOptions)

Starts the Documentize.TocGenerator processing with the specified parameters.

public static ResultContainer Process(TocOptions options)

Parameters

  • options TocOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An Documentize.ResultContainer object containing the result of the operation.

Namespace: Documentize Assembly: Documentize.dll

Class TocHeading

Info

Represents options for Headings or Titles of Table of Contents to document by Documentize.TocGenerator plugin.

public class TocHeading

Inheritance

objectTocHeading

Inherited Members

Constructors

TocHeading(string, int, bool, int)

Initializes a new instance of the Documentize.TocHeading.

public TocHeading(string text = "", int pageNumber = 1, bool generateNumbering = false, int level = 1)

Parameters

  • text string: The Text of the Heading.
  • pageNumber int: Page Number for link.
  • generateNumbering bool: Using Number generation.
  • level int: The Level.

Properties

GenerateNumbering

Using Number generation. If true, then the numbering should be done automatically; otherwise, the numbering should be done manually.

public bool GenerateNumbering { get; set; }

Property Value

bool

Level

The Level. Used for Number generation.

public int Level { get; set; }

Property Value

int

PageNumber

The Page Number for link.

public int PageNumber { get; set; }

Property Value

int

Text

The Text of the Title.

public string Text { get; set; }

Property Value

string

Namespace: Documentize Assembly: Documentize.dll

Class TocOptions

Info

Represents options for add Table of Contents to document by Documentize.TocGenerator plugin.

public sealed class TocOptions : PluginBaseOptions, IPluginOptions

Inheritance

objectPluginBaseOptionsTocOptions

Implements

Inherited Members

Constructors

TocOptions()

Initializes a new instance of the Documentize.TocOptions object with default options.

public TocOptions()

Properties

GenerateBookmarks

Using Bookmarks generation. If set true then Bookmarks will be cleared and generated by Headings; otherwise, Bookmarks will not change.

public bool GenerateBookmarks { get; set; }

Property Value

bool

Headings

Headings or Titles of Table of Content.

public List<tocheading> Headings { get; set; }

Property Value

List<TocHeading>

Title

The Title of Table of Contents.

public string Title { get; set; }

Property Value

string

Namespace: Documentize Assembly: Documentize.dll

Class XlsConverter

Info

Represents Documentize.XlsConverter plugin. Used to convert PDF documents into XLSX/XLS/CSV/XLSM/ODS formats.

public static class XlsConverter

Inheritance

objectXlsConverter

Inherited Members

Examples

The example demonstrates how to convert PDF to XLSX document.

// Create PdfToXlsOptions object to set instructions
var options = new PdfToXlsOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_xlsx_file.xlsx"));
// Perform the process
XlsConverter.Process(options);

The example demonstrates how to convert PDF to XLS document.

// Create PdfToXlsOptions object to set instructions
var options = new PdfToXlsOptions();
// Add input file path
options.AddInput(new FileDataSource("path_to_your_pdf_file.pdf"));
// Specify XLS format
options.Format = PdfToXlsOptions.ExcelFormat.XMLSpreadSheet2003;
options.InsertBlankColumnAtFirst = true;
options.MinimizeTheNumberOfWorksheets = true;
// Set output file path
options.AddOutput(new FileDataSource("path_to_result_xlsx_file.xls"));
// Perform the process
XlsConverter.Process(options);

Methods

Process(PdfToXlsOptions)

Converts PDF document into XLSX/XLS/CSV/XLSM/ODS formats.

public static ResultContainer Process(PdfToXlsOptions options)

Parameters

  • options PdfToXlsOptions: An options object containing instructions for the operation.

Returns

ResultContainer : An object containing the result of the operation.

Exceptions

ArgumentException

If options not set.

Namespace: Documentize Assembly: Documentize.dll

Enum ConvertErrorAction

Info

This class represents action for conversion errors.

public enum ConvertErrorAction

Fields

  • Delete = 0
  • None = 1

Namespace: Documentize Assembly: Documentize.dll

Enum ConvertSoftMaskAction

Info

This action represents actions for conversion of images with soft mask.

public enum ConvertSoftMaskAction

Fields

  • ConvertToStencilMask = 1: Soft mask will be converted into stencil mask.
  • Default = 0: Use default strategy.

Namespace: Documentize Assembly: Documentize.dll

Enum DataType

Info

Represents possible types of data for plugin processing.

public enum DataType

Fields

  • Directory = 2: Data type is a directory represented by the path to it.
  • File = 0: Data type is a file represented by the path to it.
  • Stream = 1: Data type is a stream.

Namespace: Documentize Assembly: Documentize.dll

Enum DocConversionMode

Info

Defines conversion mode of the output document.

public enum DocConversionMode

Fields

  • Flow = 1: Full recognition mode, the engine performs grouping and multi-level analysis to restore the original document author’s intent and produce a maximally editable document. The downside is that the output document might look different from the original PDF file.
  • TextBox = 0: This mode is fast and good for maximally preserving original look of the PDF file, but editability of the resulting document could be limited. Every visually grouped block of text in the original PDF file is converted into a textbox in the resulting document. This achieves maximal resemblance of the output document to the original PDF file. The output document will look good, but it will consist entirely of textboxes and it could makes further editing of the document in Microsoft Word quite hard. This is the default mode.

Namespace: Documentize Assembly: Documentize.dll

Enum HtmlMediaType

Info

Specifies possible media types used during rendering.

public enum HtmlMediaType

Fields

  • Print = 0: Print.
  • Screen = 1: Screen.

Namespace: Documentize Assembly: Documentize.dll

Enum HtmlPageLayoutOption

Info

Specifies flags that together other options determine sizes and layouts of pages.

public enum HtmlPageLayoutOption

Fields

  • FitToWidestContentWidth = 3: Indicates that the width of the page is determinated from the content size itself, not from the specified page width.
  • None = 0: Default value which indicates that the HtmlPageLayoutOption will not affect the sizes and layouts of pages.
  • ScaleToPageWidth = 256: Indicates the content of the document will be scaled to fit the page.

Namespace: Documentize Assembly: Documentize.dll

Enum PdfAStandardVersion

Info

Specifies the PDF/A standard version for a PDF document.

public enum PdfAStandardVersion

Fields

  • Auto = 0: The PDF/A standard version is determined automatically.
  • PDF_A_1A = 1: Specifies the PDF/A-1a standard version.
  • PDF_A_1B = 2: Specifies the PDF/A-1b standard version.
  • PDF_A_2A = 3: Specifies the PDF/A-2a standard version.
  • PDF_A_2B = 4: Specifies the PDF/A-2b standard version.
  • PDF_A_2U = 5: Specifies the PDF/A-2u standard version.
  • PDF_A_3A = 6: Specifies the PDF/A-3a standard version.
  • PDF_A_3B = 7: Specifies the PDF/A-3b standard version.
  • PDF_A_3U = 8: Specifies the PDF/A-3u standard version.

Namespace: Documentize Assembly: Documentize.dll

Enum PdfToHtmlOptions.SaveDataType

Info

Defines output type of HTML file.

public enum PdfToHtmlOptions.SaveDataType

Fields

  • FileWithEmbeddedResources = 1: Save HTMl to file with embedded resources
  • FileWithExternalResources = 0: Save HTMl to file with external resources
  • StreamWithEmbeddedResources = 2: Save HTMl to file stream with embedded resources

Namespace: Documentize Assembly: Documentize.dll

Enum PdfToXlsOptions.ExcelFormat

Info

Allows to specify xls/xlsx/xml/csv file format. Default value is XLSX.

Allows to specify xls/xlsx/xml/csv file format. Default value is XLSX.

public enum PdfToXlsOptions.ExcelFormat

Fields

  • CSV = 2: A comma-separated values (.csv) File Format.
  • ODS = 4: Open Document Spreadsheet.
  • XLSM = 3: A macro-enabled Office Open XML (.xlsm) File Format.
  • XLSX = 1: Office Open XML (.xlsx) File Format.
  • XMLSpreadSheet2003 = 0: Excel 2003 XML (.xls) File Format.

Namespace: Documentize Assembly: Documentize.dll

Enum Role

Info

The role of the messages author.

public enum Role

Fields

  • Assistant = 2
  • System = 1
  • User = 0

Namespace: Documentize Assembly: Documentize.dll

Enum Rotation

Info

Enumeration of possible rotation values.

public enum Rotation

Fields

  • None = 0: Non-rotated.
  • On180 = 2: Rotated on 180 degrees.
  • On270 = 3: Rotated on 270 degrees clockwise.
  • On360 = 4: Rotated on 360 degrees clockwise.
  • On90 = 1: Rotated on 90 degrees clockwise.

Namespace: Documentize Assembly: Documentize.dll

Enum TextFormattingMode

Info

Defines different modes which can be used while converting a PDF document into text. See Documentize.TextExtractorOptions class.

public enum TextFormattingMode

Fields

  • Flatten = 2: Represent PDF content with positioning text fragments by their coordinates. It is basically similar to “Raw” mode. But while “Raw” focuses on preserving the structure of text fragments (operators) in a document, “Flatten” focuses on keeping text in the order it is read.
  • Pure = 0: Represents PDF text content with a few formatting routines. This includes taking into account relative positions and adding extra spaces to align text to the width of the page.
  • Raw = 1: Represents PDF content as is, i.e. without formatting.

Namespace: Documentize Assembly: Documentize.dll

Enum TiffColorDepth

Info

Used to specify the Color Depth for the Documentize.PdfToTiffOptions.

public enum TiffColorDepth

Fields

  • Format1bpp = 4: 1 bit per pixel.
  • Format24bpp = 1: 24 bits per pixel. Rgb.
  • Format32bpp = 0: 32 bits per pixel. Used by default.
  • Format4bpp = 3: 4 bits per pixel.
  • Format8bpp = 2: 8 bits per pixel.

Namespace: Documentize Assembly: Documentize.dll

Enum TiffCompression

Info

Used to specify the Compression type for the Documentize.PdfToTiffOptions.

public enum TiffCompression

Fields

  • CCITT3 = 2: Specifies the CCITT3 compression scheme. Can be passed to the CCITT3 encoder as a parameter that belongs to the Compression category.
  • CCITT4 = 1: Specifies the CCITT4 compression scheme. Can be passed to the CCITT4 encoder as a parameter that belongs to the Compression category.
  • LZW = 0: Specifies the LZW compression scheme. Can be passed to the Tiff encoder as a parameter that belongs to the Compression category.
  • None = 4: Specifies no compression. Can be passed to the Tiff encoder as a parameter that belongs to the compression category.
  • RLE = 3: Specifies the RLE compression scheme. Can be passed to the RLE encoder as a parameter that belongs to the Compression category.

Namespace: Documentize Assembly: Documentize.dll

Interface IDataSource

Info

General data interface that defines common members that concrete data should implement.

public interface IDataSource

Properties

DataType

Type of data source.

DataType DataType { get; }

Property Value

DataType

Namespace: Documentize Assembly: Documentize.dll

Interface IOperationResult

Info

General operation result interface that defines common methods that concrete plugin operation result should implement.

public interface IOperationResult

Properties

Data

Gets raw data.

object Data { get; }

Property Value

object

IsFile

Indicates whether the result is a path to an output file.

bool IsFile { get; }

Property Value

bool

IsStream

Indicates whether the result is an output stream.

bool IsStream { get; }

Property Value

bool

IsString

Indicates whether the result is a text string.

bool IsString { get; }

Property Value

bool

Methods

ToFile()

Tries to convert the result to the file.

string ToFile()

Returns

string : A string representing the path to the output file if the result is file; otherwise null.

ToStream()

Tries to convert the result to the stream object.

Stream ToStream()

Returns

Stream : A stream object representing the output data if the result is stream; otherwise null.

Namespace: Documentize Assembly: Documentize.dll

Interface IPluginOptions

Info

General plugin option interface that defines common methods that concrete plugin option should implement.

public interface IPluginOptions

Namespace: Documentize Assembly: Documentize.dll

 English