API Reference
PdfBytesResult
Result returned by non-throwing in-memory PDF byte generation.
Inheritance
- Object
- PdfBytesResult
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method PdfBytesResult.FromFailure
- Method PdfBytesResult.FromSuccess
- Method PdfDocument.TryToBytes
Methods
public static PdfBytesResult FromFailure(Exception exception) #PdfBytesResultCreates a failed byte generation result from an exception captured by a wrapper or adapter.
Parameters
- exception System.Exception
public static PdfBytesResult FromSuccess(Byte[] bytes) #PdfBytesResultCreates a successful byte generation result.
Parameters
- bytes System.Byte[]
public Byte[] RequireBytes() #Byte[]Returns generated PDF bytes or throws with diagnostics when generation failed.
Inherited Methods
Properties
public Boolean Succeeded { get; } #True when byte generation completed.
public Byte[] Bytes { get; } #Generated PDF bytes when the operation completed; otherwise an empty array.
public Int64 ByteCount { get; } #Number of generated bytes when the operation completed; otherwise 0.
public IReadOnlyList<String> Diagnostics { get; } #Human-readable diagnostics explaining why byte generation failed.
public Exception Exception { get; } #Exception captured from the byte generation attempt, when available.
public IReadOnlyList<PdfTextEncodingDiagnostic> TextEncodingDiagnostics { get; } #Structured text encoding diagnostics captured from PDF generation failures.
public PdfConversionReport Report { get; } #Structured PDF output warnings captured for this byte-generation attempt.
public PdfPipelineReport Pipeline { get; } #End-to-end create/open, mutation, and byte-generation evidence.
public IReadOnlyList<PdfConversionWarning> Warnings { get; } #Structured PDF output warnings captured for this byte-generation attempt.
public Boolean HasWarnings { get; } #True when PDF output produced a warning.