is-pdf-valid

0.0.1 • Public • Published

isPDF

Check if is a PDF file valid.

Why

I have a file with the extension "PDF" but the file is damaged because the download was interrupted, so I need to know if it is a real PDF file.

Install

npm install is-pdf-valid --save

Example

const fs = require("fs");
const isPDF = require("is-pdf-valid");
 
const file = fs.readFileSync("./test.pdf")
console.log(isPDF(file));

Readme

Keywords

Package Sidebar

Install

npm i is-pdf-valid

Weekly Downloads

824

Version

0.0.1

License

MIT

Unpacked Size

3.86 kB

Total Files

5

Last publish

Collaborators

  • matiasmarani