🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

pdf-to-base64

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf-to-base64

Generate a pdf to base64

1.0.3
latest
Source
npm
Version published
Weekly downloads
7.6K
-7.41%
Maintainers
1
Weekly downloads
 
Created
Source

pdf-to-base64

Generate a base64 from pdf path or url.

NPM Version NPM Downloads Build Status devDependencies Status Codacy Badge License

About

It was all about converting the pdf into base64 string

Getting Started

Install

npm i -S pdf-to-base64

After: After:

const pdf2base64 = require('pdf-to-base64');
pdf2base64("test/sample.pdf")
    .then(
        (response) => {
            console.log(response); //cGF0aC90by9maWxlLmpwZw==
        }
    )
    .catch(
        (error) => {
            console.log(error); //Exepection error....
        }
    )
const pdf2base64 = require('pdf-to-base64');
pdf2base64("http://www.africau.edu/images/default/sample.pdf")
    .then(
        (response) => {
            console.log(response); //cGF0aC90by9maWxlLmpwZw==
        }
    )
    .catch(
        (error) => {
            console.log(error); //Exepection error....
        }
    )

LICENSE

MIT

Keywords

node

FAQs

Package last updated on 04 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts