Introduction

EffPdf

EffPdf is a simple API to create PDF's from HTML.

Quick Start

Below is the minimal steps to get to your first Pdf!

Quick-start copy-and-paste

const response = await fetch('https://api.effpdf.com/pdfs', {
  method: 'POST',
  headers: {
    'x-access-token': 'youraccesstokenhere'
  },
  body: JSON.stringify({
    fileName: 'myAwesome.pdf',
    html: '<h1>Hello there</h1>'
  })
}).then((res) => res.json())
// https://cdn.effpdf.com/llknqweoiq2090n20/myAwesome.pdf
window.open(response.url)

Endpoints

Get list of Pdf's

GET https://api.effpdf.com/pdfs

Response:

{
  data: [{
    id: 'laksjdflknadlfkn',
    userId: 'lkasdflkajsdflkjads',
    path: '/path/to/file.pdf',
    apiKeyId: 'lkasjdflkajsdflkj',
    html: '<h1>Hello world</h1>',
    header: '',
    footer: '',
    format: 'A4',
    createdAt: '2024-01-11T11:56:49.912Z',
    updatedAt: '2024-01-11T11:56:49.912Z',
    url: 'https://cdn.effpdf.com/path/to/fileName.pdf'
  }],
  count: 1,
  page: 1,
  pages: 1
}

Create Pdf

POST https://api.effpdf.com/pdfs

Request body:

{
  html: `<h1>Any valid html & css</h1>
    <style type="text/css">
    h1 {
      font-family: Verdana, Arial;
    }
    </style>`
}

Available body parameters:

NameValueDefaultRequired
htmlstringnulltrue
fileNamestringrandom idfalse
formatA4, letter, envelope"A4"false
headerstringnullfalse
footerstringnullfalse

Response body:

{
  id: 'laksjdflknadlfkn',
  userId: 'lkasdflkajsdflkjads',
  path: '/path/to/file.pdf',
  apiKeyId: 'lkasjdflkajsdflkj',
  html: '<h1>Hello world</h1>',
  header: '',
  footer: '',
  format: 'A4',
  createdAt: '2024-01-11T11:56:49.912Z',
  updatedAt: '2024-01-11T11:56:49.912Z',
  url: 'https://cdn.effpdf.com/path/to/fileName.pdf'
}

Get a single Pdf

GET https://api.effpdf.com/pdfs/{id}

Response body:

{
  id: 'laksjdflknadlfkn',
  userId: 'lkasdflkajsdflkjads',
  path: '/path/to/file.pdf',
  apiKeyId: 'lkasjdflkajsdflkj',
  html: '<h1>Hello world</h1>',
  header: '',
  footer: '',
  format: 'A4',
  createdAt: '2024-01-11T11:56:49.912Z',
  updatedAt: '2024-01-11T11:56:49.912Z',
  url: 'https://cdn.effpdf.com/path/to/fileName.pdf'
}

Update a Pdf

PUT https://api.effpdf.com/pdfs/{id}

Request body:

Optional, see Create Pdf

Available body parameters:

NameValueDefaultRequired
htmlstringnullfalse

EffPdf FAQ

Q: Can I update an existing Pdf?

A: Yes, see

Q: How much does EffPdf cost?

A: EffPdf is $7/month for unlimited Pdf's and cloud storage.