Table of Contents

Interface IDocxToPdfPreflight

Namespace
DocToolkit.Extensions.DependencyInjection
Assembly
DocToolkit.Extensions.DependencyInjection.dll

Lists what a document CONTAINS that IDocxToPdfConverter may not represent, so a caller converting third-party documents knows which ones need a human to look at them. Registered by AddDocToolkit(IServiceCollection, Action<DocToolkitOptions>?).

public interface IDocxToPdfPreflight

Remarks

An inventory of the input, never a claim about what was lost. Nothing here converts anything, so nothing here can know what the renderer did — it answers "is there anything in this file worth a second look?", which stays true whatever a future renderer improves.

Methods

Inspect(byte[])

Lists the constructs in docx that the PDF renderer may not represent.

DocxToPdfPreflightReport Inspect(byte[] docx)

Parameters

docx byte[]

The document to inspect.

Returns

DocxToPdfPreflightReport

Exceptions

ArgumentNullException

docx is null.

ArgumentException

docx is empty.

DocumentConversionException

It could not be opened or read.

InspectAsync(Stream, CancellationToken)

Lists the constructs in docx that the PDF renderer may not represent.

Task<DocxToPdfPreflightReport> InspectAsync(Stream source, CancellationToken ct = default)

Parameters

source Stream

The document to inspect. Read to its end; never disposed or sought.

ct CancellationToken

Cancels before the document is read.

Returns

Task<DocxToPdfPreflightReport>