Developer Resources - Sejda.com

Developer Docs

Web Integrations

API reference

Web Integrations

Integrate your website with our PDF tools

Open your files with our web tools

Open files from your website using our web tools (eg: the PDF editor).

Here are some use-cases:

  1. Allow clients to easily fill out your PDF form, using our editor.
  2. Provide a simple way for your clients to crop your PDF templates.

Configure demo


Copy Click to try

Use the link on your website or in your emails. Here are some use-cases:

  1. Allow clients to easily fill out your PDF form, using our editor.
  2. Provide a simple way for your clients to crop your PDF templates.

Setup

Input files can be passed as a GET parameter, in JSON format.

https://www.sejda.com/pdf-editor?files=[{"downloadUrl":"https://www.example.com/download/sample.pdf"}];

Above code displays unencoded JSON for readability. You'll need to URL encode the JSON value:

https://www.sejda.com/pdf-editor?files=%5B%7B%22downloadUrl%22%3A%22https%3A%2F%2Fwww.example.com%2Fdownload%2Fsample.pdf%22%7D%5D;

An array of multiple files is accepted for certain tools (eg: merge, compress).


'Save to PDF' link for your web page

Let your visitors save web pages to PDF.

Demo

Copy and paste the HTML code below and add it to your web page:

Copy Click to try

Setup

No setup is required.
The web page URL to be converted is determined from the HTTP Referrer.

Want to configure the URL of the page being converted?

https://www.sejda.com/html-to-pdf?save-link=https://example.com

Want a specific page size?

https://www.sejda.com/html-to-pdf?save-link=https://example.com&pageSize=A3
Name Description
save-link Web page URL to convert to PDF. Defaults to referring page the user is coming from (HTTP referrer).
pageSize One of the standard page sizes: a0, a1, a2, a3, a4, a5, letter, legal. Default to one long page (empty value).


API reference

Access Sejda.com tools from your code

Hosted API, running on our sejda.com servers.

Currently in BETA. This API is not production ready yet.

Endpoint URL

The Sejda.com API is organized around REST. We recommend using SSL encryption by issuing requests through HTTPS, however it’s not enforced.

https://api.sejda.com/v1/tasks

Pricing

Free to use within the free tier limits.
Paid API plans will be announced when going out of BETA.

Limits

Current limit is 30 requests per minute.
Need more? Please get in touch.

Authentication

No account or api key required to get started with the free tier.

HTML to PDF

Convert HTML web pages to PDF documents.

Get started

Run this CURL command in your console:

$> curl -i https://api.sejda.com/v1/tasks\
  --fail --silent --show-error \
  --header "Content-Type: application/json" \
  --data '{"url": "csszengarden.com",
           "type": "htmlToPdf" }' > csszengarden_com.pdf

Request headers

Content-Type: application/json

Body format

JSON format. Examples:

Example: convert URL to PDF:

{"type":"htmlToPdf","url":"csszengarden.com"}

Example: convert HTML code to PDF:

{"type":"htmlToPdf","htmlCode":"<strong>HTML<\/strong> rules"}

Parameters:

Name Type Default Description
url string optional Web page URL to convert to PDF. Eg: "http://csszengarden.com"
htmlCode string optional HTML source code to convert to PDF. Eg: <strong>HTML</strong> rules
pageSize string one_long_page one_long_page or one of the standard page sizes: a0, a1, a2, a3, a4, a5, letter, legal.
pageOrientation string auto landscape, portrait or auto.

HTTP response codes

200 All OK. Response contents will be the PDF document stream.
429 Rate limit reached.
400 Invalid request.
500 An error on our side.

Other PDF tools

API access for other PDF tools (crop, merge, compress, etc) is coming soon.


Get notified about updates to the Sejda.com APIs

* indicates required