In an invoice application, when the user clicks the ‘Print Invoice’ button, the PDF invoice generated by the system is sent to the Print PDF action in Base64 format, and the user initiates the printing process.
Adding a Print Action
- Go to the UI Design module and add a Button element from the Elements panel on the left.
- Enter ‘Print PDF’ in the Label section of the button.
- Select the button and add the following action from the + ADD ACTION menu:
- OnClick → Get Component Base64
- Capture the PDF data in Base64 format returned from the PDF creation action.
- Then, in the same OnClick, using this Base64 data:
- Add the Device → Print PDF action.
- Assign the Base64 code from the PDF creation action to the Base64 parameter.
- Click the SAVE button to complete the process.