
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
RWPrint is a print library that decorate all templates of Primavera, you can customize footer, header and add custom styles providing a cdn(url) path or inline css.
yarn add @redwagon/rw-print
npm install -S @redwagon/rw-print
import { RwPrint } from '@redwagon/rw-print'
// some styles for the element (optional)
const rw = new RwPrint()
// you can use styles with css text or cdn
const styles = {
cssText:{
header:{
font-size: '10px';
},
table td: {
boder: '1px solid gray'
}
}
}
const styles = {
cdn: 'https://cdn.primaverahealthcare.com/styles/css/print-patient.css'
}
const header = {
title: 'Test for print header',
logoUrl: 'https://cdn.primaverahealthcare.com/static/images/logo.svg'
}
const footer = {
patientName: 'Nicolas Restrepo',
printedBy: 'Rolian Ruiz',
logoUrl: 'https://cdn.primaverahealthcare.com/static/images/logo.svg'
}
const config = {
styles,
header,
footer
}
const template = document.getElementById('mytable'); //item in dom o template custom
// opens the "print dialog" of your browser to print the element
rw.print(template, config )
The constructor supports an optional parent element (HTMLElement) where the printable element will be appended. Default value is window.document.body.
Example:
const rw = new RwPrint( document.getElementById('parent') )
Interfaces:
interface IStyles {
cssText?: string;
cdn?: string;
}
interface IFooterData {
printedBy: string;
patientName?: string;
logoUrl: string;
}
interface IHeaderData {
title: string;
logoUrl: string;
}
interface IConfig {
styles?: IStyles;
header?: IHeaderData;
footer?: IFooterData;
}
Function to print the current HTMLElement.
Params:
HTMLElement to print.launchPrint(win) to trigger the printing.
Window reference.Document reference.HTMLElement reference.Function to trigger the printing on demand.const rw = new RwPrint()
const styles = {
cdn: 'https://cdn.primaverahealthcare.com/styles/css/print-patient.css'
}
const header = {
title: 'Test for print header',
logoUrl: 'https://cdn.primaverahealthcare.com/static/images/logo.svg'
}
const footer = {
patientName: 'Nicolas Restrepo',
printedBy: 'Rolian Ruiz',
logoUrl: 'https://cdn.primaverahealthcare.com/static/images/logo.svg'
}
const config = {
styles,
header,
footer
}
rw.print(document.getElementById('h1'), config)
Returns the current HTMLIFrameElement reference.
const { contentWindow } = rw.getIFrame()
contentWindow.addEventListener('beforeprint', () => console.log('before print!'))
contentWindow.addEventListener('afterprint', () => console.log('after print!'))
MIT license
FAQs
print and customize document in primavera health
We found that rw-print 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.