In a business application, users view their reports on a dynamically generated report screen with various graphs, tables, and text components. Users want to convert this report component to Base64 format, convert it to PDF, and download it to their devices.
Adding the Get Component Base64 Action
- UI Design module, create a button named ‘Download as PDF’.
- Select the button and add the Get Component Base64 action from the Properties panel:
- + ADD ACTION → OnClick → Get Component Base64.
- In the Get Component Base64 action:
- Component ID: Specify the ID of the container or panel where the report is located. (For example: reportContainer)
- Set the Quality and Orientation parameters as needed.
- Once the Get Component Base64 action is complete, pass the returned Base64 data as a parameter to the next action.
Then, you can use the Base64 data to download the PDF file using Download File From Server or initiate an external API call.