
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@isneezy/pdf-generator-service
Advanced tools
A powerful and versatile web service for converting HTML pages, templates, and URLs into high-quality PDF documents.
@isneezy/pdf-generator-service
is a web service that allows you to easily generate PDFs from a web interface.
It uses the @isneezy/pdf-generator library to generate the PDFs and provides an HTTP API that
you can use to generate PDFs from a web application.
The package is available in three forms:
You can install the package as a command line interface using npm or yarn.
npm install -g @isneezy/pdf-generator-service
yarn global add @isneezy/pdf-generator-service
The package is also available as a container image on quay.io. It's suggested to check the available tags here before pulling the image.
To run the service in a container, you can use the docker run command and specify the necessary environment variables and ports.
For example:
docker run -p 3000:3000 quay.io/isneezy/pdf-generator-service
This command will start the service and make it accessible on port 3000.
To start the service, you can use the pdf-generator-service command.
pdf-generator-service [options]
Option | Type | Default | Description |
---|---|---|---|
-V, --version | Output the version number | ||
-p, --port | number | 3000 | Specify the port in which the service will be listening |
-c, --cors | boolean | false | Enable CORS (Cross-Origin Resource Sharing) |
-l, --log-level | string | info | Specify the log level (info, warn, error, silent) |
It's important to note that when using the container image, the options should be passed as environment variables.
The service exposes a single endpoint: POST /v1/generate.
You can use this endpoint to generate a PDF by making a POST request with the following options as the request body.
Option | Type | Default | Description |
---|---|---|---|
goto | string | URL to the HTML content/handlebars template to be converted to PDF. If set this takes priority over template option | |
template | string | Handlebars template to be converted to PDF | |
headerTemplate | string | Handlebars template to be rendered as page header | |
footerTemplate | string | Handlebars template to be rendered as page footer | |
context | object | {} | Data to be passed to the HTML template |
format | string | A4 | Sets paper format type to be used when printing a PDF (default: "A4") |
landscape | boolean | false | Use this flag to switch the orientation from portrait to landscape (default: false) |
margin | object | {top: "10mm", bottom: "10mm", left: "10mm", right: "10mm"} | Set the page margins (default: "10mm") |
FAQs
A powerful and versatile web service for converting HTML pages, templates, and URLs into high-quality PDF documents.
We found that @isneezy/pdf-generator-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.