Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@vivliostyle/print
Advanced tools
Allows page-layouting using the vivliostyle for printing within a website without destroying the original layout
Allows page-layouting using the vivliostyle for printing within a website without destroying the original layout
npm install @vivliostyle/print --save
import {printHTML} from '@vivliostyle/print'
const htmlDoc = `<!doctype html>
<html>
<head>
<style>
... Add your CSS code here ...
</style>
</head>
<body>
... Add your HTML code here ...
</body>
</html>`,
config = {
title: 'my printed page',
printCallback: iframeWin => iframeWin.print() // optional: only needed if calling something other than window.print() for printing.
errorCallback: message => alert(message) // optional: only needed if you want to handle errors.
}
printHTML(htmlDoc, config)
You can also take a look at the demo (sourcecode) .
git clone https://github.com/vivliostyle/vivliostyle-print.git
cd vivliostyle-print
npm install
npm run build_demo
php -S localhost:8000 -t demo/
On larger projects, it can be difficult to ensure that no developer is accidentally breaking the terms of the Vivliostyle AGPL license. Vivliostyle-print only exposes one of the functions of Vivliostyle that does not allow the sharing of complex data structures between surrounding code and Vivliostyle, which is the most important requirements to follow when using VIvliostyle in combination with a non-open source project. For more information cocnerning the license, read this.
Please report any bugs and open pull requests on the Vivliostyle main repo.
FAQs
Allows page-layouting using the vivliostyle for printing within a website without destroying the original layout
The npm package @vivliostyle/print receives a total of 156 weekly downloads. As such, @vivliostyle/print popularity was classified as not popular.
We found that @vivliostyle/print demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.