Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfSaveResult

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
be6c300e4ab1 with working tree changes
Implements
IOfficeOutputResult IOfficeResult
Modifiers
sealed

Result returned by file and stream output operations.

Inheritance

  • object
  • PdfSaveResult

Usage

Explore 5 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.

Methods

FromFailure 2 overloads
public static PdfSaveResult FromFailure(string? outputPath, Exception exception) #

Creates a failed save result from an exception captured by a wrapper or adapter.

Parameters

outputPath string? required
exception System.Exception required
public static PdfSaveResult FromFailure(string? outputPath, Exception exception, OfficeConversionReport sourceConversionReport) #

Creates a failed save result while retaining the source-stage report that caused the failure.

Parameters

outputPath string? required
exception System.Exception required
sourceConversionReport OfficeIMO.OfficeConversionReport required
public static PdfSaveResult FromSuccess(string? outputPath, long bytesWritten) #

Creates a successful save result.

Parameters

outputPath string? required
bytesWritten long required
public PdfSaveResult RequireSuccess() #

Returns this result or throws with diagnostics when the save failed.

public void ThrowIfLoss() #

Requires a successful save without reported conversion loss.

Properties

public bool Succeeded { get; } #

True when the save operation completed.

public string? OutputPath { get; } #

Full output path when the operation targeted a file path.

public long BytesWritten { get; } #

Number of bytes written when the operation completed; otherwise 0.

public IReadOnlyList<string> Diagnostics { get; } #

Human-readable diagnostics explaining why the save failed.

public Exception? Exception { get; } #

Exception captured from the save attempt, when available.

public IReadOnlyList<PdfTextEncodingDiagnostic> TextEncodingDiagnostics { get; } #

Structured text encoding diagnostics captured from PDF generation failures.

public PdfConversionReport Report { get; } #

Snapshot of PDF-stage structured output warnings for this save attempt.

public IReadOnlyList<OfficeConversionReport> ConversionReports { get; } #

Ordered source-stage reports followed by the PDF-stage report, when conversion preceded the save.

public PdfPipelineReport Pipeline { get; } #

End-to-end create/open, mutation, and output evidence for this save attempt.

public PdfSerializationReport? Serialization { get; } #

Bounded serialization evidence for a successful save, when available.

public IReadOnlyList<PdfConversionWarning> Warnings { get; } #

PDF-stage structured output warnings for this save attempt.

public bool HasWarnings { get; } #

True when the PDF stage produced a structured output warning.

public bool HasLoss { get; } #

True when any source or PDF conversion stage reported possible content loss.

public IReadOnlyList<OfficeDiagnostic> ConversionDiagnostics { get; } #

All source and PDF-stage diagnostics with their original loss categories preserved.