Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
export-web-to-pdf
Advanced tools
Node.js lib to export any web page to PDF.
npm install export-web-to-pdf
or if you rather use yarn
yarn add export-web-to-pdf
const exportWebToPdf = require("export-web-to-pdf");
exportWebToPdf("http://www.example.com", exportOptions)
.then(data => {
// .. do something with PDF data, like saving to a file or upload to S3 ..
});
See the sample/
folder for a running example.
let response = exportWebToPdf(url, options);
url
(string) URL you want converted to PDF
options
(object) An options object containing custom settings. The possible options are:
loadingTimeout
: Maximum amount of time to wait for navigation to finish. Defaults to 30000
.auth.username
auth.password
: Adds username and password to the request.ignoreHTTPSErrors
: Whether to ignore HTTPS errors during navigation. Defaults to false
.showBrowserConsole
: Whether to log the browser's console messages. Defaults to false
.waitForSelectors
: Array of CSS selectors. If defined, it will wait until all CSS selector are found in the page before continuing.screenshotPath
: If defined saves a screenshot of the navigated URL. This only works when waitForSelectors
are not found on the page, as a debugging tool.pdfSettings
: Options object with PDF settings. Check Puppeteers's documentation for details.A Promise
that resolves to a Buffer
with the PDF content.
FAQs
Node.js lib to export any web page to PDF
The npm package export-web-to-pdf receives a total of 20 weekly downloads. As such, export-web-to-pdf popularity was classified as not popular.
We found that export-web-to-pdf 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.