Table of Contents

Method ConvertToBytesAsync

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

ConvertToBytesAsync(string, PdfAConversionOptions, CancellationToken)

Asynchronously converts the PDF at inputPath to PDF/A and returns the converted bytes together with the report.

public static Task<PdfAConversionResult> ConvertToBytesAsync(string inputPath, PdfAConversionOptions options = null, CancellationToken cancellationToken = default)

Parameters

inputPath string
options PdfAConversionOptions
cancellationToken CancellationToken

Returns

Task<PdfAConversionResult>

ConvertToBytesAsync(byte[], PdfAConversionOptions, CancellationToken)

Asynchronously converts in-memory PDF bytes to PDF/A and returns the converted bytes together with the conversion report.

public static Task<PdfAConversionResult> ConvertToBytesAsync(byte[] pdfData, PdfAConversionOptions options = null, CancellationToken cancellationToken = default)

Parameters

pdfData byte[]
options PdfAConversionOptions
cancellationToken CancellationToken

Returns

Task<PdfAConversionResult>

ConvertToBytesAsync(Stream, PdfAConversionOptions, CancellationToken)

Asynchronously converts the PDF read from inputStream to PDF/A and returns the converted bytes together with the report.

public static Task<PdfAConversionResult> ConvertToBytesAsync(Stream inputStream, PdfAConversionOptions options = null, CancellationToken cancellationToken = default)

Parameters

inputStream Stream
options PdfAConversionOptions
cancellationToken CancellationToken

Returns

Task<PdfAConversionResult>

ConvertToBytesAsync(Attachment, PdfAConversionOptions, CancellationToken)

Asynchronously converts the PDF carried by attachment to PDF/A and returns the converted bytes together with the report.

public static Task<PdfAConversionResult> ConvertToBytesAsync(Attachment attachment, PdfAConversionOptions options = null, CancellationToken cancellationToken = default)

Parameters

attachment Attachment
options PdfAConversionOptions
cancellationToken CancellationToken

Returns

Task<PdfAConversionResult>
Share