pdfire-client / io.pdfire.client / Client

Client

class Client

Sends conversion parameters to the PDFire.io servers and builds the correct result.

Constructors

<init>

Client(apiKey: String)

Sends conversion parameters to the PDFire.io servers and builds the correct result.

Properties

apiKey

var apiKey: String

Your PDFire.io API key.

Functions

convert

fun convert(params: Parameters): Result

Submit the conversion/merge parameters and return the result.

convertHTML

fun convertHTML(html: String, params: ConversionParameters? = null): Result

Convert the given HTML with the provided conversion parameters.

convertToByteArray

fun convertToByteArray(params: Parameters): ByteArray

Submit the conversion/merge parameters and return the result as a byte array.

convertURL

fun convertURL(url: String, params: ConversionParameters? = null): Result

Convert the given URL with the provided conversion parameters.

convertUsingCDN

fun convertUsingCDN(params: Parameters): Conversion

Submit the conversion/merge parameters and return the conversion result. Throws an error if the account does not include the CDN option.

convertUsingStorage

fun convertUsingStorage(params: Parameters, configure: (StorageParameter) -> Unit = null): Conversion

Submit the conversion/merge parameters and return the conversion result. Throws a error if the accout does not include the storage option.

Companion Object Properties

baseUrl

val baseUrl: String

Base URL to the PDFire.io API.