
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.
@nextbusiness/react-pdf-renderer
Advanced tools
React renderer for creating PDF files on the browser and server
yarn add @nextbusiness/react-pdf-renderer
import {
Document,
Page,
Text,
View,
StyleSheet,
} from '@nextbusiness/react-pdf-renderer';
// Create styles
const styles = StyleSheet.create({
page: {
flexDirection: 'row',
backgroundColor: '#E4E4E4',
},
section: {
margin: 10,
padding: 10,
flexGrow: 1,
},
});
// Create Document Component
const MyDocument = () => (
<Document>
<Page size="A4" style={styles.page}>
<View style={styles.section}>
<Text>Section #1</Text>
</View>
<View style={styles.section}>
<Text>Section #2</Text>
</View>
</Page>
</Document>
);
Web. Render in DOMimport ReactDOM from 'react-dom';
import { PDFViewer } from '@nextbusiness/react-pdf-renderer';
const App = () => (
<PDFViewer>
<MyDocument />
</PDFViewer>
);
ReactDOM.render(<App />, document.getElementById('root'));
Node. Save in a fileimport ReactPDF from '@nextbusiness/react-pdf-renderer';
ReactPDF.render(<MyDocument />, `${__dirname}/example.pdf`);
For each example, try opening output.pdf to see the result.
|
Text |
Resume |
Fractals |
|
Knobs |
Page wrap |
This project exists thanks to all the people who contribute. [Contribute].
Thank you to all our sponsors! [Become a sponsors]
Thank you to all our backers! [Become a backer]
MIT © Diego Muracciole
FAQs
Create PDF files on the browser and server
We found that @nextbusiness/react-pdf-renderer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.

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.