WEB to PDF Rest API.

The API for converting Web Pages to PDF files.

Available converters

API Request

Parameter Description Value
Secret

Optional

String

Authentication secret must be provided as a query parameter. If omitted, token must be provided.

Secret
Token

Optional

String

Authentication token must be provided as a query parameter. If omitted, secret must be provided.

Token
Parameter Description Value
FileName

Optional

String

File name (without extension) of the converted file.

FileName
Url

Required

String

URI of a web page to convert. Must start with http:// or https://. If URI has special characters like ? or & they must be encoded.

Url
Parameter Description Value
StoreFile

Optional

Bool

Store converted file on server.

Default: False

StoreFile
Timeout

Optional

Integer

Conversion timeout in seconds.

Default: 60

Values: 10 .. 120

Timeout
ConversionDelay

Optional

Integer

Delay in seconds before page load and PDF creation. Sometimes usefull to let web page to load in full.

Default: 0

Values: 0 .. 30

ConversionDelay
Scripts

Optional

Bool

Allow web pages to run javascript.

Default: True

Scripts
Parameter Description Value
Async

Optional

Bool

Run conversion job asynchronously.

Default: False

Async
JobId

Optional

String

Conversion job self generated UUID (RFC 4122) used for getting conversion result asynchronously.

JobId
Parameter Description Value
AuthUsername

Optional

String

HTTP authentication username. Could be used if conversion web page is protected with HTTP authentication.

AuthUsername
AuthPassword

Optional

String

HTTP authentication password. Could be used if conversion web page is protected with HTTP authentication.

AuthPassword
Parameter Description Value
AdBlock

Optional

Bool

Block ads in converting page.

Default: False

AdBlock
LoadLazyContent

Optional

Bool

Load page images that loads only when they are visible.

Default: False

LoadLazyContent
CssMediaType

Optional

Collection

Use CSS media type in conversion process.

Default: screen

Values: screen, print

CssMediaType
ViewportWidth

Optional

Integer

Sets browser viewport width.

Default: 1366

Values: 0 .. 10000000

ViewportWidth
ViewportHeight

Optional

Integer

Sets browser viewport height.

Default: 768

Values: 0 .. 10000000

ViewportHeight
Background

Optional

Bool

Print web page background.

Default: True

Background
FixedElements

Optional

Collection

Change fixed elements CSS 'position' property to adapt page for conversion.

Default: fixed

Values: fixed, absolute, relative, hide

FixedElements
Zoom

Optional

Float

Set the default zoom level of webpages.

Default: 1

Values: -10.0 .. 100.0

Zoom
Parameter Description Value
PageOrientation

Optional

Collection

PDF page orientation.

Default: portrait

Values: portrait, landscape

PageOrientation
PageSize

Optional

Collection

PDF page size.

Default: letter

Values: a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, b0, b1, b2, b3, b4, b5, letter, legal, ledger

PageSize
PageWidth

Optional

Integer

Custom page width in millimeters. This option override PageSize option.

Values: 10 .. 30000

PageWidth
PageHeight

Optional

Integer

Custom page height in millimeters. This option override PageSize option.

Values: 10 .. 30000

PageHeight
Parameter Description Value
MarginTop

Optional

Integer

Set the page top margin in millimeters.

Default: 10

Values: 0 .. 500

MarginTop
MarginRight

Optional

Integer

Set the page right margin in millimeters.

Default: 10

Values: 0 .. 500

MarginRight
MarginBottom

Optional

Integer

Set the page bottom margin in millimeters.

Default: 10

Values: 0 .. 500

MarginBottom
MarginLeft

Optional

Integer

Set the page left margin in millimeters.

Default: 10

Values: 0 .. 500

MarginLeft
Parameter Description Value
PageRange

Optional

String

Set page range. Example 1-10 or 1,2,5.

Default: 1-10

PageRange

Snippets are autogenerated according to converter parameter choices above. Please select file in "File" or "Files" parameter before using code snippets.