Installations
npm install da-qr-watermark
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=0.10
NPM Version
1.4.28
Score
50.8
Supply Chain
86
Quality
69
Maintenance
50
Vulnerability
97.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (30.26%)
Python (28.59%)
PHP (16.77%)
Shell (16.47%)
Java (7.9%)
Developer
Download Statistics
Total Downloads
1,418
Last Day
1
Last Week
1
Last Month
4
Last Year
62
GitHub Statistics
2 Stars
44 Commits
1 Watching
1 Branches
2 Contributors
Package Meta Information
Latest Version
1.0.1
Package Id
da-qr-watermark@1.0.1
Size
4.92 kB
NPM Version
1.4.28
Total Downloads
Cumulative downloads
Total Downloads
1,418
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
300%
4
Compared to previous month
Last year
-35.4%
62
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
1
Watermarking a PDF document with a QR code
In this example we will follow a two-step process to first create (and store) an image of a QR code and then use that image to watermark a PDF document.
This example demonstrates several features of the Document Alchemy API:
-
How to create a QR code image.
-
How to create a document directly within the Document Alchemy file-store.
-
How to use a stored document within another API call.
-
How to watermark a PDF document (using a stored image and an uploaded PDF file).
-
How to delete a file from the Document Alchemy file-store.
Installing
(These instructions assume you've already installed a modern version of Node.js/IO.js. If you haven't yet, see https://nodejs.org/ for details.)
To simplify the task, this example uses the popular request module (on GitHub at request/request).
To install the module, simply run:
1npm install
from within this directory (the one containing package.json
and this README
file). This will download and install all of the necessary third-party
libraries.
Running
To run this example, you will need:
-
A DocumentAlchemy API key. If you don't have one yet, you can obtain one immediately by signing up for DocumentAlchemy.
-
A PDF document to watermark.
The general format for running this program is this:
1node qr-watermark.js <API-KEY> <TEXT-TO-ENCODE> <PDF-TO-WATERMARK> [<OUTPUT-FILE-NAME>]
For example, if your API key value is HbblCNv7gLN2pasWFK44
, the command:
1node qr-watermark.js HbblCNv7gLN2pasWFK44 "http://www.example.com/" myDocument.pdf watermarkedDocument.pdf
will create (or overwrite) the file watermarkedDocument.pdf
, containing a copy
of myDocument.pdf
with a QR code (pointing to www.example.com) stamped on
every page.
The output of the program may look something like this:
Creating the QR code...
...Success! Created and stored QR code as document ID "8cxwka1gbjoflxrqi2ux2z2".
Watermarking the PDF document using that stored image...
...Success! Watermarked PDF document saved at "watermarkedDocument.pdf".
Deleting the QR code...
...Success! Stored document deleted from the server.
(Note that qr-watermark.js
is also directly executable via:
1qr-watermark.js <API-KEY> <TEXT-TO-ENCODE> <PDF-TO-WATERMARK> [<OUTPUT-FILE-NAME>]
if your shell recognizes the #!/usr/bin/env node
hash-bang identifier.)
How it works
Please review the code and comments found in qr-watermark.js
for a detailed
explanation of the process.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE.txt:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More