pdfire / io.pdfire.client / Conversion

Conversion

class Conversion : AbstractResult

Represents a conversion that has failed or is served via a CDN / custom cloud storage.

Constructors

<init>

Conversion(initializedAt: OffsetDateTime, finishedAt: OffsetDateTime, status: String, error: String?, result: ConversionResult)

Represents a conversion that has failed or is served via a CDN / custom cloud storage.

Properties

error

val error: String?

Error message if the conversion failed.

finishedAt

val finishedAt: OffsetDateTime

Completion / Failure time of the conversion.

initializedAt

val initializedAt: OffsetDateTime

Initilization time of the conversion.

result

val result: ConversionResult

The conversion result.

status

val status: String

Either "succeeded" or "failed".

Functions

download

fun download(): ByteArray

Download the PDF from the CDN or custom cloud storage.

getBytes

fun getBytes(): ByteArray

Return the PDF as a byte array.

Inherited Functions

saveTo

open fun saveTo(path: String): Unit

Save the PDF to the given path.