How to integrate Postman with PDF.co

About Postman

Postman is the collaboration platform for API development, used by 10 million developers and 500,000 companies worldwide. The Postman API Platform’s features simplify each step of building an API and streamline collaboration so you can create better APIs—faster. We’re a global company with headquarters in San Francisco, a large office in Bangalore (where the company was founded), and distributed team members on four continents. Postman is privately held, with funding from Insight Partners, Nexus Venture Partners, and CRV.

Read more about Postman at http://postman.com

Step by Step Tutorial

This tutorial will show you how to import the Postman Collection JSON, set up your Postman environment, use the different PDF.co API endpoints to convert HTML to PDF and a whole lot more.

Before beginning the Postman Collection tutorial, please do the following:

How to Import Postman Collection JSON on Postman

Step 1 – Sign up on PDF.co and get your API key.

Step 2 – Open Postman and click the Import button on the top left.

Postman Import Button

Step 3 – Click on Upload files button and select the Postman Collection JSON file.

Upload Postman Collection JSON

Step 4 – Click on Import button

Confirm Import

Step 5 – Once you have imported the file, you should see PDF.co API v.1 under Collections Tab.

Collections Tab

How to Set Up An Environment on Postman

Step 1 – Next, we are going to set up an Environment. Click on the gear icon on top right.

Step 2 – Then click the Add button.

Create Environment

Step 3 – For this demonstration, I am going to name my environment Demo.

Environment Name

Step 4 – Next add the variable name x-api-key under Variable Column and your API key in Current Value

Environment Variable

Step 5 – Then click on the Add button

Add Environment

Step 5 – Select your Environment name on the drop-down menu

Select Environment Name

How to Convert HTML Code to PDF

Step 1 – Open the Collections tab and expand PDF.co API v.1 folder

Expand Postman Collection

Step 2 – Expand PDF Generator folder and click on PDF from HTML

Expand PDF from HTML folder

Step 3 – Click on GET /pdf/convert/from/html.

Get Endpoint

Step 4 – Click on Body tab

PDF from HTML Body

Step 5 – Select form-data

Step 6 – Look for the HTML key and paste your HTML code for its value.

Insert HTML Code

Step 8 – Write your desired output filename in the name key value.

Step 9 – Click on the Send button

Send button

Step 10 – Scroll down and make sure that the Status is 200 OK.

HTML to PDF Status

Step 11 – Copy the URL and paste it in your browser’s address bar to see your converted HTML Code to PDF.

NOTE: The PDF file is temporarily stored in the cloud and will expire in an hour. Be sure to download/move it to permanent storage.

What is PDF.co?

PDF.co is the secure and scalable data extraction API service with a full set of PDF tools included.

Benefits:

  • Decrease data entry costs using AI-powered unstructured data extraction from PDF and scanned documents, invoices, reports, receipts, agreements;
  • Read from complex documents using customizable Document Parser. Supports automatic reading from tables, PDF forms, mixed content documents;
  • Save time on preparing documents with PDF filler functionality that can add text, images, fields to PDF forms and PDF documents;
  • Leverage power of the built-in full set of PDF tools: split PDF, merge PDF, delete pages, advanced HTML to PDF generation;
  • Detailed API logs for Enterprise users with audit logs requirements;
  • On-premise and offline versions are available for Enterprise users;

Security

  • All documents and files processed by PDF.co are encrypted at rest using AES 256-bit encryption;
  • PDF.co relies on TLS and SSL to transmit data and files (the same security protocols that are used by banks)
  • Runs on award-winning secure certified Amazon AWS infrastructure: https://pdf.co/security

Postman and PDF.co integration

Contact us if you need help or support:

Contact Support

Related Pages: