Print page

Hello,

Question, when i am in the webapp application i can do right click and then select print, to print the page.
Is it possible to do this action with a button and codeless logic?

Hi Michel,

Yes, it is possible and it is quite simple. Here’s a demo:
https://www.backendless.us/api/files/ui-builder/containers/support/index.html?page=printPage

Go into the codeless logic the button that prints the page:

Add the Custom code block to the On Click event for the button:

Click the gear icon on the Custom code block and add the following line of code in the editor:

Click SAVE AND CLOSE and you’re done.

Regards,
Mark

1 Like

Thanks @mark-piller !!

Hi @mark-piller,

I am trying to print the page and add it to an email as attachment, can you guide me to how that can be done?

To send an email with an attachment, the file that will be used as the attachment must be saved in the file system. I do not know how to combine both printing the page and sending email into one action since it would be up to the user to save the page as PDF.

1 Like