Socket
Socket
Sign inDemoInstall

pdf-to-base64

Package Overview
Dependencies
7
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pdf-to-base64

Generate a pdf to base64


Version published
Weekly downloads
5.7K
decreased by-18.74%
Maintainers
1
Install size
486 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 04 Oct 2020

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc