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
docxbyte[]The document to inspect.
Returns
Exceptions
- ArgumentNullException
docxis null.- ArgumentException
docxis 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
sourceStreamThe document to inspect. Read to its end; never disposed or sought.
ctCancellationTokenCancels before the document is read.