1.0.1 • Published 5 months ago
pdfgenlib v1.0.1
pdfgenlib
Description
pdfgenlib is a library for generating PDF files from HTML content in a secure manner.
Installation
To install pdfgenlib, use the following command:
npm install pdfgenlib
Usage
const pdfgenlib = require('pdfgenlib');
// Example usage to convert HTML to PDF
const req = {
html: '<h1>Hello, World!</h1>',
size: 'A4',
filename: 'example.pdf'
};
const staticpath = '/path/to/save/example.pdf';
pdfgenlib.convertHtmlToPdf(req, staticpath);
// Example usage to encrypt a PDF
const filename = 'example.pdf';
const password = 'securepassword';
pdfgenlib.encryptPdf(filename, password);
License
pdfgenlib is licensed under the MIT License.