Easy PDF Server

Easy PDF Server A Simple API to Convert HTML to PDF

By developers for developers

Use these code samples to automate HTML to PDF conversion in minutes using our simple REST API:

API Key

URL or HTML

curl -f 'https://api.easypdfserver.com/make-pdf' \ --data-binary '{"html":"YOUR-HTML-STRING", "key":"YOUR-API-KEY"}' \ > download.pdf curl -f 'https://api.easypdfserver.com/make-pdf' \ --data-binary '{"url":"YOUR-URL", "key": "YOUR-API-KEY"}' \ > download.pdf
const https = require('https'), fs = require('fs'); const data = JSON.stringify({ key: 'YOUR-API-KEY', html: 'YOUR-HTML-STRING', }); const options = { hostname: 'api.easypdfserver.com', port: 443, path: '/make-pdf', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length, }, }; const req = https.request(options, res => { let body = Buffer.alloc(0); res.on('data', chunk => body = Buffer.concat([body, chunk])); res.on('end', () => fs.writeFile('download.pdf', body, console.error)); }); req.on('error', console.error); req.write(data); req.end(); const https = require('https'), fs = require('fs'); const data = JSON.stringify({ key: 'YOUR-API-KEY', url: 'YOUR-URL', }); const options = { hostname: 'api.easypdfserver.com', port: 443, path: '/make-pdf', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length, }, }; const req = https.request(options, res => { let body = Buffer.alloc(0); res.on('data', chunk => body = Buffer.concat([body, chunk])); res.on('end', () => fs.writeFile('download.pdf', body, console.error)); }); req.on('error', console.error); req.write(data); req.end();
$key = 'YOUR-API-KEY'; $html = 'YOUR-HTML-STRING'; $postdata = json_encode( array( 'key' => $key, 'html' => $html, ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/json', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('https://api.easypdfserver.com/make-pdf',false,$context); file_put_contents('download.pdf',$result); $key = 'YOUR-API-KEY'; $url = 'YOUR-URL'; $postdata = json_encode( array( 'key' => $key, 'url' => $url, ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/json', 'content' => $postdata ) ); $context = stream_context_create($opts); $result = file_get_contents('https://api.easypdfserver.com/make-pdf',false,$context); file_put_contents('download.pdf',$result);
import requests API_ENDPOINT = "https://api.easypdfserver.com/make-pdf" r = requests.post(url = API_ENDPOINT, json = {"key":"YOUR-API-KEY", "html":"YOUR-HTML-STRING"}) f = open("download.pdf", "w") f.write(r.content) f.close() import requests API_ENDPOINT = "https://api.easypdfserver.com/make-pdf" r = requests.post(url = API_ENDPOINT, json = {"key":"YOUR-API-KEY", "url":"YOUR-URL"}) f = open("download.pdf", "w") f.write(r.content) f.close()
require 'net/http' require 'net/https' require 'uri' require 'json' uri = URI.parse("https://api.easypdfserver.com/make-pdf") data = { 'key': 'YOUR-API-KEY', 'html': 'YOUR-HTML-STRING'}.to_json https = Net::HTTP.new(uri.host,uri.port) https.use_ssl = true req = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' =>'application/json'}) req.body = data res = https.request(req) File.binwrite('download.pdf', res.body) require 'net/http' require 'net/https' require 'uri' require 'json' uri = URI.parse("https://api.easypdfserver.com/make-pdf") data = { 'key': 'YOUR-API-KEY', 'url': 'YOUR-URL'}.to_json https = Net::HTTP.new(uri.host,uri.port) https.use_ssl = true req = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' =>'application/json'}) req.body = data res = https.request(req) File.binwrite('download.pdf', res.body)

Need help? All plans come with email support! Ask us a question.

Send HTML

Send HTML...

Send your HTML text or a URL to our API for processing.

Magic

*magic*

Our lightning fast, high availability cloud servers will magically transform your HTML into PDF.

Get PDF

...get your PDF.

Download your pdf in your application and serve to your customer as needed.

Converting HTML to PDFs has never been so easy

Sign up today and get full access to the API, cancel anytime.

Looking to host the code yourself instead of using the API?

Check out Easy PDF Server on AWS Marketplace.

Pricing Plans

Single Developer API Plan

API - Monthly

$20/mo

includes email support

Small Business API Plan

API - Yearly (Save 42%)

$120/yr

includes email support

Enterprise API Plan

Self Hosted

$0.39/hr

includes email support

Subscribe

Hello, there! We'd love to hear from you. Send us a message.