Class PdfConverter
Contents
[
Hide
]PdfConverter class
Represents PdfConverter plugin.
public class PdfConverter : IDisposable, IPlugin
Constructors
Name | Description |
---|---|
PdfConverter() | The default constructor. |
Methods
Name | Description |
---|---|
Dispose() | Implementation of IDisposable. |
Process(IPluginOptions) | Starts the PdfConverter processing with the specified parameters. |
Examples
The example demonstrates how to convert PDF to HTML document.
// create PdfConverter
var converter = new PdfConverter();
// create PdfConverterToHtmlOptions object to set output data type as file with embedded resources
var opt = new PdfConverterToHtmlOptions(PdfConverterToHtmlOptions.SaveDataType.FileWithEmbeddedResources);
// add input file path
opt.AddDataSource(new FileDataSource(inputPath));
// set output file path
opt.AddSaveDataSource(new FileDataSource(outputPath));
converter.Process(opt);
The example demonstrates how to convert PDF to XLSX document.
// create PdfConverter
var converter = new PdfConverter();
// create PdfConverterToExcelOptions
var opt = new PdfConverterToExcelOptions();
// add input file path
opt.AddDataSource(new FileDataSource(inputPath));
// set output file path
opt.AddSaveDataSource(new FileDataSource(outputPath));
converter.Process(opt);
The example demonstrates how to convert HTML to PDF document.
// create PdfConverter
var converter = new PdfConverter();
// create PdfConverterHtmlToPdfOptions
var opt = new PdfConverterHtmlToPdfOptions();
// add input file path
opt.AddDataSource(new FileDataSource(inputPath));
// set output file path
opt.AddSaveDataSource(new FileDataSource(outputPath));
converter.Process(opt);
See Also
- interface IPlugin
- namespace Aspose.Pdf.Plugins
- assembly Aspose.PDF