Generate PDF document
You might want to generate PDF files from your tables for reporting and other purposes. Here's how you can do it in UI Bakery:
We suppose that by this time you have already connected your app to the data source
  1. 1.
    Load your data and add a Table to display it. For example, we will load a table with users' data.
  2. 2.
  3. 3.
    Specify the below code:
const doc = new jspdf.jsPDF();
head: [['ID', 'Name', 'Email', 'Bio']],
body: {{ui.loadUsers.value}}.map(({ id, fullName, email, bio }) => ([id, fullName, email, bio])),
Please note the code is exemplary and needs to be modified based on your table's and necessary file's structure
As the next step, add a Button that will download the generated file.
Open Button's settings, navigate Triggers&condition tab and assign the generatePDF action to the On Click trigger.
Copy link