# pdf-to-base64

> Generate a pdf to base64

Latest version **1.0.3** (published 2020-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install pdf-to-base64
pnpm add pdf-to-base64
yarn add pdf-to-base64
bun add pdf-to-base64
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-10-04 |
| First published | 2018-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Shubham Bansal |
| Maintainers | sbansal1997 |
| Keywords | node, nodejs, module convert base64 nodejs, pdf2base64, pdf-to-base64, convert-pdf-base64, convert, code, base64, pdf, webpack, loader, pdf, src, pdf src |

## Links

- npm: https://www.npmjs.com/package/pdf-to-base64
- Repository: https://github.com/ShubhamBansal1997/pdf-to-base64
- Homepage: https://github.com/ShubhamBansal1997/pdf-to-base64#readme
- Issues: https://github.com/ShubhamBansal1997/pdf-to-base64/issues
- npm.io page: https://npm.io/package/pdf-to-base64

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.2.0

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2020-10-04
- 1.0.2 — 2019-01-17
- 1.0.1 — 2018-10-27
- 1.0.0 — 2018-10-27

## README

# pdf-to-base64
Generate a base64 from pdf path or url.

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status](https://travis-ci.org/ShubhamBansal1997/pdf-to-base64.svg?branch=master)](https://travis-ci.org/ShubhamBansal1997/pdf-to-base64)
[![devDependencies Status](https://david-dm.org/ShubhamBansal1997/pdf-to-base64/dev-status.svg)](https://david-dm.org/ShubhamBansal1997/pdf-to-base64?type=dev)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d66858b831d74e358e6ce381dd27b931)](https://www.codacy.com/app/ShubhamBansal1997/pdf-to-base64?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ShubhamBansal1997/pdf-to-base64&amp;utm_campaign=Badge_Grade)
<a href="https://www.npmjs.com/package/vue"><img src="https://img.shields.io/npm/l/vue.svg" alt="License"></a>


## About
It was all about converting the pdf into base64 string

## Getting Started

Install
```bash
npm i -S pdf-to-base64
```
After:
After:
```js
const pdf2base64 = require('pdf-to-base64');
pdf2base64("test/sample.pdf")
    .then(
        (response) => {
            console.log(response); //cGF0aC90by9maWxlLmpwZw==
        }
    )
    .catch(
        (error) => {
            console.log(error); //Exepection error....
        }
    )
```

```js
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](https://opensource.org/licenses/MIT)

[npm-image]: https://img.shields.io/npm/v/pdf-to-base64.svg
[npm-url]: https://npmjs.org/package/pdf-to-base64
[downloads-image]: https://img.shields.io/npm/dm/pdf-to-base64.svg
[downloads-url]: https://npmjs.org/package/pdf-to-base64

---
_Source: https://npm.io/package/pdf-to-base64 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
