API Reference
PdfDocumentConversionResult
Result of a source-document to PDF conversion, pairing the generated PDF document with a snapshot of conversion diagnostics.
Inheritance
- Object
- PdfDocumentConversionResult
Usage
Explore 10 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 6
- Method OfficeDocumentModelPdfExtensions.ToPdfDocumentResult
- Method PdfDocumentConversionResult.Process
- Method PdfDocumentConversionResult.WithAdditionalWarnings
- Method PdfDocumentConversionResult.WithSourceConversionReport
- Method PdfDocumentConversionResult.WithValue
- Method PdfPlainTextConverter.ToPdfDocumentResult
Accepted by parameters 4
- Extension method PdfDocumentConversionResult.ExportImages
- Extension method PdfDocumentConversionResult.ToImages
- Method PdfImageExportExtensions.ExportImages
- Method PdfImageExportExtensions.ToImages
Constructors
public PdfDocumentConversionResult(PdfDocument document, PdfConversionReport conversionReport) #Creates a conversion result from a generated PDF document and the conversion report populated during export.
Parameters
- document OfficeIMO.Pdf.PdfDocument
- conversionReport OfficeIMO.Pdf.PdfConversionReport
Methods
public PdfConversionProofReport AssertProof(PdfConversionProofOptions? options = null) #PdfConversionProofReportBuilds a conversion proof snapshot and throws when requested proof checks fail.
Parameters
- options OfficeIMO.Pdf.PdfConversionProofOptions? = null
public PdfConversionProofReport AssessArtifactProof(Byte[] artifact, PdfConversionProofOptions? options = null) #PdfConversionProofReportChecks the supplied serialized artifact without serializing the document again. Call after PdfDocumentConversionResult.ToBytes to bind readback and hash checks to the bytes actually saved. Conversion diagnostics are taken from this result; the caller must supply its corresponding artifact.
Parameters
- artifact System.Byte[]
- options OfficeIMO.Pdf.PdfConversionProofOptions? = null
public PdfConversionProofReport AssessProof(PdfConversionProofOptions? options = null) #PdfConversionProofReportBuilds a reusable proof snapshot for the generated PDF and captured conversion diagnostics.
Parameters
- options OfficeIMO.Pdf.PdfConversionProofOptions? = null
public PdfDocumentConversionResult Process(Func<PdfDocument, PdfDocument> process) #PdfDocumentConversionResultApplies PDF post-processing while preserving the captured conversion diagnostics in the returned result.
Parameters
- process System.Func<OfficeIMO.Pdf.PdfDocument, OfficeIMO.Pdf.PdfDocument>
public PdfDocument RequireNoLoss() #PdfDocumentReturns the generated PDF document only when every conversion stage reported no possible content loss.
public PdfSaveResult Save(Stream stream) #PdfSaveResultWrites the generated PDF document to the supplied stream and returns conversion plus output evidence.
Parameters
- stream System.IO.Stream
public PdfSaveResult Save(Stream stream, CancellationToken cancellationToken) #PdfSaveResultWrites the converted PDF while observing cancellation.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken
public PdfSaveResult Save(String path) #PdfSaveResultWrites the generated PDF document to the supplied file path and returns conversion plus output evidence.
Parameters
- path System.String
public PdfSaveResult Save(String path, CancellationToken cancellationToken) #PdfSaveResultWrites the converted PDF while observing cancellation.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken
public async Task<PdfSaveResult> SaveAsync(Stream stream, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Asynchronously writes the generated PDF document to the supplied stream and returns conversion plus output evidence.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public async Task<PdfSaveResult> SaveAsync(String path, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Asynchronously writes the generated PDF document to the supplied file path and returns conversion plus output evidence.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public PdfSaveResult SaveLossless(Stream stream, CancellationToken cancellationToken = default) #PdfSaveResultPublishes staged bytes to a stream only after every conversion stage remains lossless.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public PdfSaveResult SaveLossless(String path, CancellationToken cancellationToken = default) #PdfSaveResultAtomically publishes staged bytes to a file only after every conversion stage remains lossless.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public async Task<PdfSaveResult> SaveLosslessAsync(Stream stream, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Asynchronously publishes staged bytes to a stream only after every conversion stage remains lossless.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public async Task<PdfSaveResult> SaveLosslessAsync(String path, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Asynchronously and atomically publishes staged bytes to a file only after every conversion stage remains lossless.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public PdfSaveResult SaveResult(Stream stream, CancellationToken cancellationToken = default) #PdfSaveResultAttempts to write the generated PDF document to the supplied stream and returns output diagnostics instead of throwing.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public PdfSaveResult SaveResult(String path, CancellationToken cancellationToken = default) #PdfSaveResultAttempts to write the generated PDF document to the supplied file path and returns output diagnostics instead of throwing.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public Task<PdfSaveResult> SaveResultAsync(Stream stream, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Attempts to asynchronously write the generated PDF document to the supplied stream and returns output diagnostics instead of throwing.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken = default
public Task<PdfSaveResult> SaveResultAsync(String path, CancellationToken cancellationToken = default) #Task<PdfSaveResult>Attempts to asynchronously write the generated PDF document to the supplied file path and returns output diagnostics instead of throwing.
Parameters
- path System.String
- cancellationToken System.Threading.CancellationToken = default
public Byte[] ToBytesLossless(CancellationToken cancellationToken = default) #Byte[]Serializes to a private stage and returns bytes only when every conversion stage remains lossless.
Parameters
- cancellationToken System.Threading.CancellationToken = default
public PdfDocumentConversionResult WithAdditionalWarnings(IEnumerable<PdfConversionWarning> warnings) #PdfDocumentConversionResultReturns a new conversion result that prepends adapter or source-projection warnings while retaining the original converter report as a live linked source for save-time diagnostics.
Parameters
- warnings System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfConversionWarning>
public PdfDocumentConversionResult WithSourceConversionReport(IOfficeConversionReport report) #PdfDocumentConversionResultReturns a new conversion result with a typed source-stage report prepended before existing source stages and the PDF-stage report.
Parameters
- report OfficeIMO.IOfficeConversionReport
public PdfDocumentConversionResult WithValue(PdfDocument value) #PdfDocumentConversionResultReturns a new conversion result with the supplied PDF document while preserving the captured conversion diagnostics.
Parameters
- value OfficeIMO.Pdf.PdfDocument
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public PdfDocument Value { get; } #The generated PDF document, ready for fluent OfficeIMO.Pdf processing.
public Boolean Succeeded { get; } #True because a conversion result is created only after the PDF document model exists.
public PdfPipelineReport Pipeline { get; } #Create/open and post-processing evidence accumulated by the generated PDF document.
public PdfConversionReport Report { get; } #Snapshot of PDF-stage warnings captured when the result was created and refreshed after save-time diagnostics run.
public IReadOnlyList<IOfficeConversionReport> SourceConversionReports { get; } #Reports from semantic or format-projection stages that ran before PDF layout.
public IReadOnlyList<IOfficeConversionReport> ConversionReports { get; } #Ordered source-stage reports followed by the PDF-stage report.
public IReadOnlyList<PdfConversionWarning> Warnings { get; } #Warnings captured by the PDF conversion stage.
public Boolean HasWarnings { get; } #True when the PDF conversion stage produced at least one warning.
public Boolean HasLoss { get; } #True when any source or PDF conversion stage reported possible content loss.
public IReadOnlyList<OfficeConversionFidelityDiagnostic> FidelityDiagnostics { get; } #All source and PDF-stage diagnostics with their original loss categories preserved.
public PdfConversionReportSummary Summary { get; } #Counts grouped conversion diagnostics captured with this result.
Extension Methods
public static IReadOnlyList<OfficeImageExportResult> ExportImages(PdfDocumentConversionResult conversion, OfficeImageExportFormat format, PdfImageExportOptions? options = null, PdfPageSelection? selection = null, CancellationToken cancellationToken = default) #IReadOnlyList<OfficeImageExportResult>Exports pages from a source-to-PDF conversion while preserving its conversion diagnostics. This is the shared paged-image bridge for Markdown, AsciiDoc, LaTeX, RTF, OneNote, and other PDF adapters.
Parameters
- conversion OfficeIMO.Pdf.PdfDocumentConversionResult
- format OfficeIMO.Drawing.OfficeImageExportFormat
- options OfficeIMO.Pdf.PdfImageExportOptions? = null
- selection OfficeIMO.Pdf.PdfPageSelection? = null
- cancellationToken System.Threading.CancellationToken = default
public static PdfDocumentImageExportBuilder ToImages(PdfDocumentConversionResult conversion) #PdfDocumentImageExportBuilderStarts fluent paged-image export from a source-to-PDF conversion and carries its diagnostics into every page result.
Parameters
- conversion OfficeIMO.Pdf.PdfDocumentConversionResult
public static PdfDocumentImageExportBuilder ToImages(PdfDocumentConversionResult conversion, PdfImageExportOptions options) #PdfDocumentImageExportBuilderStarts fluent paged-image export with a cloned options snapshot and retained conversion diagnostics.
Parameters
- conversion OfficeIMO.Pdf.PdfDocumentConversionResult
- options OfficeIMO.Pdf.PdfImageExportOptions