Public
Documentation Settings

HelloPDF Public API Documentation

Introduction

HelloPDF's API enables developers to convert WebPage's/URL's, HTML, and MHTML to PDF's in real time.

Authentication

You can authenticate with the API by passing your API Token in the token query parameter.

Error Codes

The API only returns 200 SUCCESS, 400 INVALID PARAMETER, and 500 SERVER ERROR HTTP codes. If you encounter an HTTP 500 Response please contact support@lynndigital.com.

Rate limit

We do not limit concurrent calls. Your "Max Monthly Conversion Time" is determined by your subscription. Please visit https://www.hellopdf.co/account for more information.

GEThttps://hellopdf.co/api/pdf

https://hellopdf.co/api/pdf?token=api-token&url=url-to-convert&scale=1&landscape&pageRange&format=Letter&displayHeaderFooter&headerTemplate&footerTemplate&width&height&margin.top&margin.bottom&margin.right&margin.left&store&exportAs=pdf

WebPage/URL to PDF

The headerTemplate and footerTemplate markup have the following limitations:

  • Script tags inside templates are not evaluated.
  • Page styles are not visible inside templates

See the "Store in S3" page to view the API response when using the store field.

* = Optional Requirement

All query parameters prefixed by [PRO] are optional and require a Pro or Business subscription to use.

PARAMS
token

api-token

API Token

url

url-to-convert

WebPage/URL To Convert

scale

1

*PDF Scale: 0.1-1

landscape

*If passed then the PDF will be rendered in Landscape mode

pageRange

*Range of pages to convert. E.g 1-7

format

Letter

*PDF Format: Letter|Legal|Tabloid|Ledger|A0|A1|A2|A3|A4|A5|A6

displayHeaderFooter

[PRO] If passed then the PDF will be rendered with a Header and a Footer

headerTemplate

[PRO] HTML Header Template For PDF

footerTemplate

[PRO] HTML Footer Template For PDF

width

[PRO] PDF Width Suffixed With Unit

height

[PRO] PDF Height Suffixed With Unit

margin.top

[PRO] PDF Top Margin

margin.bottom

[PRO] PDF Bottom Margin

margin.right

[PRO] PDF Right Margin

margin.left

[PRO] PDF Left Margin

store

[PRO] If passed then document is stored in AWS. See the "Store in S3" page to view the API response.

exportAs

pdf

[PRO] File Type: pdf|png

Example Request
curl
curl --location 'https://hellopdf.co/api/pdf?token=api-token&url=url-to-convert'
Example Response
Unable to preview response. Content-Type: `application/pdf`.
No response headers
This request doesn't return any response headers

GEThttps://hellopdf.co/api/pdf - (Store in S3)

https://hellopdf.co/api/pdf?token=your-api-token&url=url-to-convert&store=yes

Convert a WebPage to a PDF then save to AWS S3.

The headerTemplate and footerTemplate markup have the following limitations:

  • Script tags inside templates are not evaluated.
  • Page styles are not visible inside templates

Any grey fields are optional. All query parameters prefixed by [PRO] require a Pro or Business subscription to use.

PARAMS
token

your-api-token

url

url-to-convert

store

yes

Example Request
curl
curl --location 'https://hellopdf.co/api/pdf?token=your-api-token&url=url-to-convert&store=yes'
200 OK
Example Response
json
{
  "code": 200,
  "url": "https://hellopdf.s3.us-east-2.amazonaws.com/docs/8a3e25f80c093f4f173e3ae531c1b7cec9c37283/5f3db6927e828.pdf"
}
Date

Wed, 19 Aug 2020 23:32:35 GMT

Content-Type

application/json

Transfer-Encoding

chunked

Connection

keep-alive

Vary

Accept-Encoding

Cache-Control

no-cache, private

X-XSS-Protection

1; mode=block

X-Content-Type-Options

nosniff

Expect-CT

max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"

Content-Encoding

br

alt-svc

h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400

POSThttps://hellopdf.co/api/pdf/raw

https://hellopdf.co/api/pdf/raw?token=api-token

HTML to PDF

PARAMS
token

api-token

API Token

Bodyraw
<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
This is my PDF
</body>
</html>
Example Request
curl
curl --location 'https://hellopdf.co/api/pdf/raw?token=api-token' \
--data '<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
This is my PDF
</body>
</html>'
Example Response
Unable to preview response. Content-Type: `application/pdf`.
No response headers
This request doesn't return any response headers