# pdf2-s3

> Download a pdf from a web url and uploads to a given s3 bucket

Latest version **2.0.4** (published 2016-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install pdf2-s3
pnpm add pdf2-s3
yarn add pdf2-s3
bun add pdf2-s3
```

## 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 | 2.0.4 |
| Published | 2016-07-19 |
| First published | 2016-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Manoj Fernando |
| Maintainers | mjzone |
| Keywords | pdf, download, url, upload, s3, bucket, weblink |

## Links

- npm: https://www.npmjs.com/package/pdf2-s3
- Repository: https://github.com/mjzone/Pdf2S3
- Homepage: https://github.com/mjzone/Pdf2S3#readme
- Issues: https://github.com/mjzone/Pdf2S3/issues
- npm.io page: https://npm.io/package/pdf2-s3

## Dependencies (6)

- [url](https://npm.io/package/url.md) ^0.11.0
- [http](https://npm.io/package/http.md) 0.0.0
- [path](https://npm.io/package/path.md) ^0.12.7
- [https](https://npm.io/package/https.md) ^1.0.0
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.4.7
- [node-uuid](https://npm.io/package/node-uuid.md) ^1.4.7

## 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

- 2.0.4 (latest) — 2016-07-19
- 2.0.3 — 2016-07-19
- 2.0.2 — 2016-07-19
- 2.0.1 — 2016-07-19
- 2.0.0 — 2016-07-19
- 1.0.4 — 2016-07-19
- 1.0.3 — 2016-07-19
- 1.0.2 — 2016-07-19
- 1.0.1 — 2016-07-18
- 1.0.0 — 2016-07-18

## README

# Description

This library will download a pdf from a given web url and upload it to a given s3 bucket.

## How to install
```
npm install pdf2-s3
```

## Prerequisite 
You should have AWS configuration settings setup before using Pdf2S3. If you haven't done that already,
Create a credentials file at ~/.aws/credentials on Mac/Linux or C:\Users\USERNAME\.aws\credentials on Windows. 
Add your credentials to that .aws file as follows.

```
[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key
```
More Information : http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html

## How to Use
```
var Pdf2S3 = require('pdf2-s3'),
    options = {
        url: 'https://test.com/test.pdf', 
        bucketName: 'my-pdf-uploads', 
        key: 'subfolder-name/pdf-name.pdf' // optional
    }
   
Pdf2S3.start(options, function(err, path) {
        // path variable contains the s3 bucket file url of the uploaded pdf. 
        if (err) {
            console.log(err);
            /* Your error handling code */
        } else {
            console.log(path);
            /* Your code here */
        }
    });

```

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