• Vivino
  • Better Proposals
  • Resumez
  • Payroll CRM
  • Podia

Try PDFShift for free and see for yourself

Rely on a leading conversion service.

Thousands of users trust us to quickly convert documents with a high-fidelity result.

  • 1M+
    Conversions made
  • 2.5s
    Average conversion time
  • 2 hours
    Average support response
  • 99.99%

Integrate PDFShift with just three lines of code

We believe that developers should focus their time on things that matter, not setting up yet another PDF library. Because we eliminate needless complexity and provide an up-to-date service, you can get up and running with PDFShift in just a couple of minutes.

// Step 1, install PDFShift
npm install pdfshift

// Step 2, import PDFShift
const pdfshift = require('pdfshift')('user_api_key');
const fs = require('fs');

// Step 3, execute
pdfshift.convert('https://en.wikipedia.org/wiki/PDF', {"landscape": false, "use_print": false}).then(function (binary_file) {
    fs.writeFile('wikipedia.pdf', binary_file, "binary", function () {})
}).catch(function({message, code, response, errors = null}) {})
import requests

response = requests.post(
    auth=('user_api_key', ''),
    json={"source": "https://en.wikipedia.org/wiki/PDF", "landscape": False, "use_print": False}


with open('wikipedia.pdf', 'wb') as f:

# We also have a package to simplify your work:
# https://pypi.org/project/pdfshift/
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.pdfshift.io/v2/convert/",
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode(array("source" => "https://en.wikipedia.org/wiki/PDF", "landscape" => false, "use_print" => false)),
    CURLOPT_HTTPHEADER => array('Content-Type:application/json'),
    CURLOPT_USERPWD => 'user_api_key:'

$response = curl_exec($curl);
file_put_contents('wikipedia.pdf', $response);

// We also have a package to simplify your work:
// https://packagist.org/packages/pdfshift/pdfshift-php
require 'uri'
require 'net/https'
require 'json' # for hash to_json conversion

uri = URI("https://api.pdfshift.io/v2/convert/")
data = {"source" => "https://en.wikipedia.org/wiki/PDF"}

Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
    request = Net::HTTP::Post.new(uri.request_uri)
    request.body = data.to_json
    request["Content-Type"] = "application/json"
    request.basic_auth 'your_api_key', ''

    response = http.request(request)

    if response.code == '200'
        # Since Ruby 1.9.1 only:
        File.binwrite("wikipedia.pdf", response.body)
        # Handle other codes here
        puts "#{response.code} #{response.body}"
import java.io.File;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.time.Duration;
import org.json.JSONObject;

public class Application {

    private static final String API_KEY = "your_api_key";

    public static void main(String... args) throws Exception {
        var jsonObject = new JSONObject();
        jsonObject.put("source", "https://en.wikipedia.org/wiki/PDF");
        var httpRequest = HttpRequest.newBuilder()
                .header("Content-Type", "application/json")
                .header("Authentication", "Basic " + API_KEY)

        var httpClient = HttpClient.newBuilder()

        var response = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofInputStream());

        var statusCode = response.statusCode();
        if (statusCode == 200 || statusCode == 201) {
            // Save the file locally
            var targetFile = new File("src/main/resources/wikipedia.pdf");
            Files.copy(response.body(), targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
        } else {
            // error occurred
using System;
using RestSharp;
using Newtonsoft.Json;
using System.IO;
using RestSharp.Authenticators;
using RestSharp.Serialization;
using System.Net.Mail;
using System.Net;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace PDFShiftExample
    class Program
        static void Main(string[] args)
            IRestClient client = new RestClient("https://api.pdfshift.io/v2/convert");
            client.Authenticator = new HttpBasicAuthenticator("your_api_key", "");

            IRestRequest request = new RestRequest(Method.POST);

            var json = new
                source = "https://en.wikipedia.org/wiki/PDF"

            IRestResponse response = client.Execute(request);
            if (!response.IsSuccessful)
                // Check why status is not int 2xx.
                File.WriteAllBytes("wikipedia.pdf", response.RawBytes);
package main

import (

func main() {
    API_KEY := "your_api_key"

    message := map[string]interface{}{
        "source":  "https://en.wikipedia.org/wiki/PDF",

    bytesRepresentation, err := json.Marshal(message)
    if err != nil {

    client := http.Client{}
    request, err := http.NewRequest("POST", "https://api.pdfshift.io/v2/convert", bytes.NewBuffer(bytesRepresentation))
    if err != nil {
    request.Header.Set("Content-Type", "application/json")
    request.Header.Set("Authorization", "Basic " + API_KEY)

    resp, err := client.Do(request)
    if err != nil {

    if resp.StatusCode >= 200 && resp.StatusCode < 300 {
        body, err := ioutil.ReadAll(resp.Body)
        if err != nil {
        // write the response to file
        ioutil.WriteFile("wikipedia.pdf", body, 0644)
    } else {
        // An error occurred
        var result map[string]interface{}


curl \
    -u 'user_api_key:' \
    -d source="https://en.wikipedia.org/wiki/PDF" \
    -d landscape="false" \
    -d use_print="false" \
    https://api.pdfshift.io/v2/convert/ \
    -o wikipedia.pdf

# That's all!


Parallel conversions

Process multiple documents in parallel to increase conversion speed.

Asynchronous request

Use our powerful webhook system to be notified once a conversion is done.

Advanced Options

Set custom headers and footers with pagination, inject custom CSS and javascript, encrypt your documents and many more!

Raw HTML support

No need to make your private page public. Simply send us your raw HTML data instead and we will convert it.

High-Fidelity PDF

Generate a high-fidelity document, close to your original HTML, in a few seconds.


That's why your documents are not stored on our server (except when explicitly requested) and are not kept for more than 2 days.

They trust us.

See what our users have to say about PDFShift.

Greg's profile
Stop rolling your own PDF generator - PDFShift has done it better.
Greg P.
Jacqui's profile
Works exactly as advertised.
Jacqui M.
Aaron's profile
Easy and developer-oriented API.
Aaron B.
Billy's profile
Perfect rendering, easy to setup and use.
Billy B.
Greg's profile
Super easy way to create PDFs.
Greg R.
Lukas's profile
Very easy and reliable.
Lukas K.


Conversions /m
Max file size
Monthly fee
Monthly Conversions:
Business 5K
Monthly conversions
File size limit (per PDF)
Custom enterprise plan
Need to convert more than 1M documents? Contact us and we will create a customized
pricing plan tailored to your needs.

+ Custom HTTP Headers, Custom Header & Footer, Encryption, Watermark, Async, Parallel Conversion, HTML/CSS support...

All our features are available on all on our plans. We don't filter the features depending on your level of subscription...

Contact Our Sales Team

Our team is happy to answer your sales questions.
Fill out the form below and we will be in touch as soon as possible