Class DocumentPdfConversionProcessor
Provides functionality to convert documents (word processing documents, spreadsheets and presentations) to PDF using LibreOffice.
Inherited Members
Namespace: FulcrumFS.Documents
Assembly: FulcrumFS.Documents.dll
Syntax
public sealed class DocumentPdfConversionProcessor : FileProcessor, IFileProcessingPipelineProvider, IFileProcessingPipelineSelector
Constructors
| Name | Description |
|---|---|
| DocumentPdfConversionProcessor(DocumentPdfConversionProcessingOptions) | Initializes a new instance of the DocumentPdfConversionProcessor class with the specified options. Note: you must configure the LibreOffice executable path by calling ConfigureWithLibreOffice(IAbsoluteDirectoryPath, DocumentPdfConversionConfigurationOptions?) before creating an instance of this class. Note: if you want to do source document validation, you need to use a FileFormatValidationProcessor configured with the appropriate document formats first and chain this after it, as this class does not perform any validation itself, it just converts the provided document to PDF. |
Properties
| Name | Description |
|---|---|
| AllowedFileExtensions | Gets the file extensions that this processor allows, including the leading dot (e.g., ".jpg", ".png"), or an empty collection if all file extensions are allowed. |
| Options | Gets the options used to configure this DocumentPdfConversionProcessor. |
Methods
| Name | Description |
|---|---|
| ConfigureWithLibreOffice(IAbsoluteDirectoryPath, DocumentPdfConversionConfigurationOptions?) | Configures the directory containing the LibreOffice program files to use for processing. On Windows: the LibreOffice `program` directory (e.g. `C:\Program Files\LibreOffice\program`), which should contain soffice.com or soffice.exe. On Linux/macOS: the directory containing the soffice executable (e.g. `/usr/bin` or `/usr/lib/libreoffice/program`) with appropriate execute permissions. |
| ProcessAsync(FileProcessingContext) | Processes the file represented by the specified FileProcessingContext. |