ByteScout Cloud API Server - PDF Information API - JavaScript - Get PDF Info From File (Node.js) - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Cloud API Server – PDF Information API – JavaScript – Get PDF Info From File (Node.js)

  • Home
  • /
  • Articles
  • /
  • ByteScout Cloud API Server – PDF Information API – JavaScript – Get PDF Info From File (Node.js)

How to get PDF info from file (node for PDF information API in JavaScript using ByteScout Cloud API Server

Follow this simple tutorial to learn get PDF info from file (node to have PDF information API in JavaScript

Writing of the code to get PDF info from file (node in JavaScript can be done by developers of any level using ByteScout Cloud API Server. ByteScout Cloud API Server was designed to assist PDF information API in JavaScript. ByteScout Cloud API Server is the ready to deploy Web API Server that can be deployed in less than thirty minutes into your own in-house Windows server (no Internet connnection is required to process data!) or into private cloud server. Can store data on in-house local server based storage or in Amazon AWS S3 bucket. Processing data solely on the server using built-in ByteScout powered engine, no cloud services are used to process your data!.

The SDK samples displayed below below explain how to quickly make your application do PDF information API in JavaScript with the help of ByteScout Cloud API Server. This JavaScript sample code can be used by copying and pasting into your project. Once done,just compile your project and click Run. This basic programming language sample code for JavaScript will do the whole work for you in implementing PDF information API in your app.

Free! Free! Free! ByteScout free trial version is available for FREE download from our website. Programming tutorials along with source code samples are assembled.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

app.js
      
/*jshint esversion: 6 */ // Please NOTE: In this sample we're assuming Cloud Api Server is hosted at "https://localhost". // If it's not then please replace this with with your hosting url. var fs = require("fs"); // `request` module is required for file upload. // Use "npm install request" command to install. var request = require("request"); // Source PDF file to get information const SourceFile = "./sample.pdf"; // Prepare URL for `PDF Info` API call var query = `https://localhost/pdf/info`; let reqOptions = { uri: query, formData: { file: fs.createReadStream(SourceFile) } }; // Send request request.post(reqOptions, function (error, response, body) { if (error) { return console.error("Error: ", error); } // Parse JSON response let data = JSON.parse(body); if (data.error == false) { // Display PDF document information for (var key in data.info) { console.log(`${key}: ${data.info[key]}`); } } else { // Service reported error console.log("Error: " + data.message); } });

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

package.json
      
{ "name": "test", "version": "1.0.0", "description": "PDF.co", "main": "app.js", "scripts": { }, "keywords": [ "pdf.co", "web", "api", "bytescout", "api" ], "author": "ByteScout & PDF.co", "license": "ISC", "dependencies": { "request": "^2.88.2" } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Cloud API Server Home Page

Explore ByteScout Cloud API Server Documentation

Explore Samples

Sign Up for ByteScout Cloud API Server Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next