Please note - this is not a free API

Before using this API you need to get an API key, by subscribing at http://www.htm2pdf.co.uk/plans-and-prices for one of the HTML to PDF API plans.

Last 7 days, UTC

Average Latency
53ms

Average Uptime
100.0%

Current Status
Online

  • No information
  • Outage
  • Disruption
  • Normal
Average latency determined from Mashape to API Response time

Endpoints

HTTP 200 : binary GET/http://api.htm2pdf.co.uk/urltopdf
urltopdf

url to pdf


Test console
Description
Parameter
string

Key to use the service
Example: yourapikey

apikey

Required

string

URL of the webpage to convert
Example: http://www.google.com

url

Required

number

width of the PDF
Example: 300

width

Optional

number

width of the PDF, 0 means one long page
Example: 400

height

Optional

number

top margin
Example: 10

top

Optional

number

bottom margin
Example: 10

bottom

Optional

number

left margin
Example: 10

left

Optional

number

right margin

right

Optional

string

location of custom header html
Example: http://www.example.com/header.html

header

Optional

string

location of custom footer HTML
Example: http://www.example.com/footer.html

footer

Optional

string

CSS media type, either print or screen
Example: print

cmt

Optional

string

specifies encryption type
Example: 128aes

encryption

Optional

string

Specifies owner password of the PDF
Example: password

ownerpass

Optional

string

Specifies document open password for the PDF
Example: password

userpass

Optional

boolean

If set, Acrobat Reader does not allow printing

noprint

Optional

boolean

If set, Acrobat Reader does not allow copying

nocopy

Optional

boolean

If set, Acrobat Reader does not allow modifying the PDF

nomodify

Optional

string

The full URL where we can find the image you want to use as watermark
Example: http://www.example.com/image.png

wm

Optional

number

x location of the watermark
Example: 10

wm_x

Optional

number

y location of the watermark
Example: 10

wm_y

Optional

number

rotation angle of the watermark
Example: 45

wm_angle

Optional

number

opacity of the watermark
Example: 0.5

wm_opac

Optional

number

scaling factor for horizontal sizing
Example: 2

wm_sx

Optional

number

scaling factor for vertical sizing
Example: 1.5

wm_sy

Optional

string

Location of background image for the PDF
Example: http://www.example.com/background.png

bg

Optional

string

Location of second background image for the PDF
Example: http://www.example.com/background.png

bg2

Optional

string

Location of third background image for the PDF
Example: http://www.example.com/background.png

bg3

Optional

number

x location of background
Example: 10

bg_x

Optional

number

y location of background
Example: 20

bg_y

Optional

number

opacity of the background
Example: 0.9

bg_opac

Optional

number

rotation angle for the background
Example: 45

bg_angle

Optional

number

horizontal scaling for the background, 0 means scale to full width
Example: 0

bg_sx

Optional

number

vertical scaling for the background, 0 means scale to full height
Example: 0

bg_sy

Optional

string

user name for http authentication
Example: peter1000

httpuser

Optional

string

password for http authentication
Example: password20

httppass

Optional

Consume this API completely for free!


By joining the mashape API marketplace you can start using HTML to PDF conversion with CSS and JavaScript API today!

Login to your account or signup: Create Account

or
   Signup with GitHub

By signing up you agree to our terms of service.