Add-on, SaaS, ExpressionEngine, PDF, WordPress

pdfl.io

Realtime PDFs Of Your Webpages! Sick of designing special PDFs for pages of your website or app? Let pdfl.io do it!

Buy Now

Introduction

Welcome to the pdfl.io! This documentation contains all the details you need to convert documents from HTML to PDF.

API Keys

Authenticate your account by including your API key in requests. You receive an initial API key when you register your account, and can manage your API keys in the Dashboard.

Authentication to the API is added as a variable called key in your query string. For example:

https://pdfl.io/convert/pdf?url=https://example.com&key=my-api-key

It is the best practice to obscure your API key, so do not use this in a way that allows web users to see this. If you are using this on your website or app interface, it is best to use one of our plugins.

Basic Usage

In order to get your PDF, all you have to include is the url and the API key as query parameters, as such:

https://pdfl.io/convert/pdf?url=https://example.com&key=my-api-key

NOTE: both URL and KEY are required keys. Your request will return 400 (Bad Request) or 401 (Unauthenticated) if either of these are missing.

This will return the PDF directly to your browser of the rendered HTML.

Parameters

pdfl.io also has a number of parameters you can use to format your PDF!

filename

A url encoded string that will be set as the filename of the PDF. The .pdf extension is not required. Default: the slugified URL sent in with the request

https://pdfl.io/convert/pdf?url=https://example.com&filename=my-awesome-pdf.pdf&key=my-api-key

download

A value to return the PDF as a download, instead of viewing in the browser. Default: false

https://pdfl.io/convert/pdf?url=https://example.com&download=1&key=my-api-key

no-background

Will not render the background images for the page. Default: false

https://pdfl.io/convert/pdf?url=https://example.com&no-background=1&key=my-api-key

greyscale

Will render the PDF in greyscale. Default: false

https://pdfl.io/convert/pdf?url=https://example.com&greyscale=1&key=my-api-key

format

Set the paper format for the PDF. Default: Letter

Options:

  • Letter: 8.5in x 11in
  • Legal: 8.5in x 14in
  • Tabloid: 11in x 17in
  • Ledger: 17in x 11in
  • A0: 33.1in x 46.8in
  • A1: 23.4in x 33.1in
  • A2: 16.54in x 23.4in
  • A3: 11.7in x 16.54in
  • A4: 8.27in x 11.7in
  • A5: 5.83in x 8.27in
  • A6: 4.13in x 5.83in

https://pdfl.io/convert/pdf?url=https://example.com&format=A4&key=my-api-key

top-view-only

By default, pdfl.io will load the entire web page. If you only want what is in the specific screen view, set this option. Default: false

https://pdfl.io/convert/pdf?url=https://example.com&top-view-only=1&key=my-api-key

disable-javascript

By default, pdfl.io will load all javascript on the page, and dismiss all alerts. Set this option to disable all javascript on a page. Default: false

https://pdfl.io/convert/pdf?url=https://example.com&disable-javascript=1&key=my-api-key

disable-images

Set this option to disable all images on the page. Default: false

https://pdfl.io/convert/pdf?url=https://example.com&disable-images=1&key=my-api-key

just-wait

Set this option to wait until all network activity on the page has ended. NOTE: If the page has long running scripts, there is a chance this will cause a timeout, or stop your PDF from rendering.

https://pdfl.io/convert/pdf?url=https://example.com&just-wait=1&key=my-api-key

delay

Set this option to delay X seconds before rendering the PDF. Especially useful if you have a page preloader on the page. Default: unset

https://pdfl.io/convert/pdf?url=https://example.com&delay=3&key=my-api-key (This will delay for 3 seconds)

Plugins

ExpressionEngine: https://expressionengine.com/add-ons/pdfl.io

WordPress: https://wordpress.org/plugins/pdfl-io/