Skip to content

OnkarRuikar/electron-react-to-print-demo

Repository files navigation

Electron App demoing react-to-print library

A basic Electron React app that uses react-to-print library to print individual components.

Implementation of print method for print-to-react is the crux of the demo. See handlePrint method in App.js. Also, See App.css for CSS print settings.

This uses React function components. If you wish to see the implementation using class components then use branch class_components.

Setup

Download and extract the project. Run following commands in the root dir:

  • Run npm install

  • Run npm run dev to start webpack-dev-server. Electron will launch automatically.

PDF Printers

To test the app following print to PDF printers can be used:


Note: All the dependencies have been updated to the latest versions available on 4th September 2022.

❯ npm ls
[email protected]
├── @babel/[email protected]
├── @babel/[email protected]
├── @babel/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

About

Electron App demoing react-to-print library use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published