PdfDocumentConversionResult
OfficeIMO.Pdf
Result of a source-document to PDF conversion, pairing the generated PDF document with a snapshot of conversion diagnostics.
Inheritance
- object
- PdfDocumentConversionResult
Usage
Explore 4 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 4
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) #Builds a conversion proof snapshot and throws when requested proof checks fail.
Parameters
- options OfficeIMO.Pdf.PdfConversionProofOptions? = null
Returns
PdfConversionProofReportpublic PdfConversionProofReport AssessArtifactProof(byte[] artifact, PdfConversionProofOptions? options = null) #Checks 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 byte[]
- options OfficeIMO.Pdf.PdfConversionProofOptions? = null
Returns
PdfConversionProofReportpublic PdfConversionProofReport AssessProof(PdfConversionProofOptions? options = null) #Builds a reusable proof snapshot for the generated PDF and captured conversion diagnostics.
Parameters
- options OfficeIMO.Pdf.PdfConversionProofOptions? = null
Returns
PdfConversionProofReportpublic PdfDocumentConversionResult Process(Func<PdfDocument, PdfDocument> process) #Applies PDF post-processing while preserving the captured conversion diagnostics in the returned result.
Parameters
- process System.Func<OfficeIMO.Pdf.PdfDocument, OfficeIMO.Pdf.PdfDocument>
Returns
PdfDocumentConversionResultpublic PdfSaveResult Save(Stream stream) #Writes the generated PDF document to the supplied stream and returns conversion plus output evidence.
Parameters
- stream System.IO.Stream
Returns
PdfSaveResultpublic PdfSaveResult Save(Stream stream, CancellationToken cancellationToken) #Writes the converted PDF while observing cancellation.
Parameters
- stream System.IO.Stream
- cancellationToken System.Threading.CancellationToken
Returns
PdfSaveResultpublic PdfSaveResult Save(Stream stream, bool failOnLoss, CancellationToken cancellationToken = default) #Writes the converted PDF. With failOnLoss, bytes are staged privately and published only when every conversion stage remains lossless.
Parameters
- stream System.IO.Stream
- failOnLoss bool
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfSaveResultpublic PdfSaveResult Save(string path) #Writes the generated PDF document to the supplied file path and returns conversion plus output evidence.
Parameters
- path string
Returns
PdfSaveResultpublic PdfSaveResult Save(string path, CancellationToken cancellationToken) #Writes the converted PDF while observing cancellation.
Parameters
- path string
- cancellationToken System.Threading.CancellationToken
Returns
PdfSaveResultpublic PdfSaveResult Save(string path, bool failOnLoss, CancellationToken cancellationToken = default) #Writes the converted PDF. With failOnLoss, bytes are staged privately and committed atomically only when every conversion stage remains lossless.
Parameters
- path string
- failOnLoss bool
- cancellationToken System.Threading.CancellationToken = default
Returns
PdfSaveResultpublic async Task<PdfSaveResult> SaveAsync(Stream stream, CancellationToken cancellationToken = default) #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
Returns
Task<PdfSaveResult>public async Task<PdfSaveResult> SaveAsync(Stream stream, bool failOnLoss, CancellationToken cancellationToken = default) #Asynchronously writes the converted PDF. With failOnLoss, bytes are staged privately and published only when every conversion stage remains lossless.
Parameters
- stream System.IO.Stream
- failOnLoss bool
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfSaveResult>public async Task<PdfSaveResult> SaveAsync(string path, CancellationToken cancellationToken = default) #Asynchronously writes the generated PDF document to the supplied file path and returns conversion plus output evidence.
Parameters
- path string
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfSaveResult>public async Task<PdfSaveResult> SaveAsync(string path, bool failOnLoss, CancellationToken cancellationToken = default) #Asynchronously writes the converted PDF. With failOnLoss, bytes are staged privately and committed atomically only when every conversion stage remains lossless.
Parameters
- path string
- failOnLoss bool
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<PdfSaveResult>public void ThrowIfLoss() #Throws an OfficeConversionException when any source or PDF conversion stage reports possible content loss.
public byte[] ToBytes(CancellationToken cancellationToken) #Renders the converted PDF while observing cancellation.
Parameters
- cancellationToken System.Threading.CancellationToken
Returns
byte[]public byte[] ToBytes(bool failOnLoss, CancellationToken cancellationToken = default) #Renders the converted PDF. With failOnLoss, bytes are staged privately and returned only when every conversion stage remains lossless.
Parameters
- failOnLoss bool
- cancellationToken System.Threading.CancellationToken = default
Returns
byte[]public PdfDocumentConversionResult WithAdditionalWarnings(IEnumerable<PdfConversionWarning> warnings) #Returns 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>
Returns
PdfDocumentConversionResultpublic PdfDocumentConversionResult WithSourceConversionReport(OfficeConversionReport report) #Returns a new conversion result with a typed source-stage report prepended before existing source stages and the PDF-stage report.
Parameters
- report OfficeIMO.OfficeConversionReport
Returns
PdfDocumentConversionResultpublic PdfDocumentConversionResult WithValue(PdfDocument value) #Returns a new conversion result with the supplied PDF document while preserving the captured conversion diagnostics.
Parameters
- value OfficeIMO.Pdf.PdfDocument
Returns
PdfDocumentConversionResultInherited Methods
Properties
public PdfDocument Value { get; } #The generated PDF document, ready for fluent OfficeIMO.Pdf processing.
public bool 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<OfficeConversionReport> SourceConversionReports { get; } #Reports from semantic or format-projection stages that ran before PDF layout.
public IReadOnlyList<OfficeConversionReport> 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 bool HasWarnings { get; } #True when the PDF conversion stage produced at least one warning.
public bool HasLoss { get; } #True when any source or PDF conversion stage reported possible content loss.
public IReadOnlyList<OfficeDiagnostic> Diagnostics { 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.