Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.75 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.75 KB

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]