This component leverages a JavaScript solution designed to simplify the printing process for web pages, allowing users to dynamically select the content they want to print. By adding a button to your webpage, you can leverage this functionality with minimal setup.
How to Use It:
Add the "PrintButton" to your webpage as dependency.
Specify the class name for the elements to include in the print view using the "ClassNameToPrint" input parameter.
Optionally, specify classes of elements to exclude from the print view by "ClassNameToIgnore".
Assign the respective classes to your screen components to print or ignore.
You're ready to go—just click the button to print!
Additional Features:
Multi-Click Prevention: The code prevents the button from being clicked multiple times during the print process.
Event Triggers: Events are provided for developers to execute custom actions when printing is completed or fails.
Added functionality to change file name.
Added demo.