Skip to content

ConvertRequest

ConvertRequest is the single-document conversion request, extending PdfRequest with the source bytes/extension and the target PdfFormat. Its static Parse overloads build a follow-on conversion request from a prior PdfResult or an existing Document, allowing conversion pipelines to be chained.

Purpose

  • Carries the source file bytes and extension to be converted, plus the desired output PdfFormat.
  • Provides Parse factories to derive a new conversion request from a previous operation's PdfResult or Document, chaining pipeline stages.
  • Retains several obsolete members from an earlier conversion pipeline shape (TimeoutMilliseconds, TryAlternateConversion, UseDebugMode, UseIntelligentPdf).*

Context

  • Namespace: PdfAPI.Core
  • Assembly/package: PdfAPI.Core

Public members

Member Signature Purpose
Format PdfFormat Format { get; } The requested output format; projects Options.OutputFormat.
File byte[] File { get; set; } The source document's bytes to convert.
FileExtension string FileExtension { get; set; } The source document's file extension.
SkipPdf bool SkipPdf { get; set; } (default true) Whether the intermediate PDF stage should be skipped during conversion.
TimeoutMilliseconds [Obsolete] int TimeoutMilliseconds (default 60000) Legacy per-request timeout, retained for backward compatibility.*
TryAlternateConversion [Obsolete] bool TryAlternateConversion Legacy fallback-conversion flag, retained for backward compatibility.*
UseDebugMode [Obsolete] bool UseDebugMode Legacy debug-mode flag, retained for backward compatibility.*
UseIntelligentPdf [Obsolete] bool UseIntelligentPdf Legacy flag selecting an alternate conversion strategy, retained for backward compatibility.*
Parse(PdfResult, PdfFormat, bool) static ConvertRequest Parse(PdfResult result, PdfFormat format = Pdf, bool sendHeatEmailOnFailure = false) Builds a new conversion request from a prior operation's result, targeting the given output format.
Parse(Document, PdfFormat, bool) static ConvertRequest Parse(Document document, PdfFormat format = Pdf, bool sendHeatEmailOnFailure = false) Builds a new conversion request directly from an existing document.
ToString() override string ToString() Renders a diagnostic summary of the request.

Inherited public members

Members in this section are inherited from PdfRequest in PdfAPI.Core. They are available on this type through inheritance.

Member Signature Purpose Origin
Id Guid Id Public field identifying this request instance. PdfAPI.Core — PdfRequest
TrackingEnabled bool TrackingEnabled { get; set; } Whether the platform should record tracking metadata for this request. PdfAPI.Core — PdfRequest
PdfConversionType PdfConversionType PdfConversionType { get; } Fixed to Convert for this request type. PdfAPI.Core — PdfRequest
SourceSystemId string SourceSystemId { get; set; } Caller-supplied identifier correlating this request back to an originating system. PdfAPI.Core — PdfRequest
SendHeatEmailOnFailure bool SendHeatEmailOnFailure { get; set; } Whether a failure-notification email should be sent when this request fails. PdfAPI.Core — PdfRequest
Options PdfOptions Options { get; set; } Output and cleanup options applied to this request. PdfAPI.Core — PdfRequest
SaveOutputPdf bool SaveOutputPdf { get; set; } (default true) Whether the produced output PDF should be persisted. PdfAPI.Core — PdfRequest
TrackingData PdfTrackingMetadata TrackingData { get; set; } Tracking metadata associated with this request. PdfAPI.Core — PdfRequest
Name [Obsolete] string Name Legacy request-name field retained for backward compatibility.* PdfAPI.Core — PdfRequest
RetryIntervalMilliseconds [Obsolete] int RetryIntervalMilliseconds Legacy retry-interval field retained for backward compatibility.* PdfAPI.Core — PdfRequest
RetryCount [Obsolete] int RetryCount Legacy retry-count field retained for backward compatibility.* PdfAPI.Core — PdfRequest

Behavioral notes

  • Format is read-only and derived from Options.OutputFormat rather than stored independently.*

Constraints and usage notes

  • Set Options.OutputFormat to control Format; there is no independent setter.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • PdfAPI.Core\Request\ConvertRequest.cs