pdf2jpg

FREEMIUM
By pdf2jpg
Updated 4 months ago
Tools
8.4/10
Popularity Score
445ms
Latency
37%
Success Rate

pdf2jpg API Documentation

Convert PDF to JPG with our API. It's fast, reliable and produce high quality pictures.

View API Details
POSTPost a PDF to be converted to JPG
GETGet the status of a conversion
POSTPost a PDF to be converted to JPG

Initiate a conversion by posting a PDF and the expected conversion quality.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
pdfBINARY
REQUIREDThis is the PDF file to be converted
Optional Parameters
qualityNUMBER
OPTIONALResolution in DPI. Default is 150.
Code Snippet
unirest.post("https://pdf2jpg-pdf2jpg.p.rapidapi.com/convert_pdf_to_jpg.php")
.header("X-RapidAPI-Host", "pdf2jpg-pdf2jpg.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.field("quality", 300)
.attach("pdf", fs.createReadStream("undefined"))
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://pdf2jpg-pdf2jpg.p.rapidapi.com/convert_pdf_to_jpg.php
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://pdf2jpg-pdf2jpg.p.rapidapi.com/convert_pdf_to_jpg.php")
.header("X-RapidAPI-Host", "pdf2jpg-pdf2jpg.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.field("quality", 300)
.attach("pdf", fs.createReadStream("undefined"))
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication