Class PdfAConverter

Class PdfAConverter

De naam: Aspose.Pdf.Plugins Verzameling: Aspose.PDF.dll (25.4.0)

Het is een plugin voor het beheren van de conversie van PDF-documenten in een PDF/A-formaat en voor de validatie van de PDF/A-conformiteit.

public sealed class PdfAConverter : IPlugin

Inheritance

object PdfAConverter

Implements

IPlugin

Geëerbiede leden

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Het voorbeeld laat zien hoe het PDF-document overeenkomt met PDF/A-formaat (PDF/A-1a in dit geval):

// 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

// Create the plugin instance
var plugin = new PdfAConverter();

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

// Check the resultContainer.ResultCollection property for validation results for each file:
for (var i = 0; i < 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
}

Het voorbeeld laat zien hoe u het PDF-document in een PDF/A-formaat kunt converteren (PDF/A-3b in dit geval):

// 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"));

// Create the plugin instance
var plugin = new PdfAConverter();

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

Constructors

Pdfaconverter()

public PdfAConverter()

Methods

Process(IPluginopties)

Een PDF/A conversie of validatieproces begint met bepaalde opties.

public ResultContainer Process(IPluginOptions options)

Parameters

options IPluginOptions

Een optie object met instructies voor de plugin. moet een voorbeeld zijn van de Aspose.Pdf.Plugins.PdfAConvertOptiesof de Aspose.Pdf.Plugins.PdfAValidateOptions klasse.

Returns

ResultContainer

Een Aspose.Pdf.Plugins.ResultContainer object met het resultaat van de verwerking.

 Nederlands