Table of Contents

Method ConvertToFileAsync

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

ConvertToFileAsync(byte[], string, bool, CancellationToken)

Converts an EML file (as a byte array) into a PDF file.

public static Task ConvertToFileAsync(byte[] emlData, string outputPath, bool stripQuotes = false, CancellationToken cancellationToken = default)

Parameters

emlData byte[]

The EML file content as a byte array.

outputPath string

Path where the output PDF will be written.

stripQuotes bool

When true, quoted and reply content is removed.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task

ConvertToFileAsync(string, string, bool, CancellationToken)

Converts an EML file at the specified path into a PDF file.

public static Task ConvertToFileAsync(string inputPath, string outputPath, bool stripQuotes = false, CancellationToken cancellationToken = default)

Parameters

inputPath string

The file system path to the EML file.

outputPath string

Path where the output PDF will be written.

stripQuotes bool

When true, quoted and reply content is removed.

cancellationToken CancellationToken

Cancels the operation.

Returns

Task

Examples

EmlToPdf.ConvertToFile("newsletter.eml", "newsletter.pdf");
Share