How to add a print button and save to pdf?

I have a nice form created in Wappler to create quotes for jobs which works nicely thanks to all for your advice. It prints nicely too as a webpage but it requires knowing how to print a web page by right clicking the page and choosing print. Is there a way to create a button which simply prints. I’d also like to save the form as a pdf for emailing, etc. Does Wappler have anything built in to facilitate this or do I need to addon some sort of extension.

Thanks,
Rick

As far as I remember, the pdf creation is something already asked (you can vote for it too). Truth is that Wappler team delivers so much joy each week that maybe the pdf creation is still somehow on the side. Regarding printing the webpage just try with jquey.
Check this

Thanks

1 Like

Hi Rick,
if you ve tested the above method, I d would like to know if you are satisfied with it and how good looking the result is for I am having the same wish too…if you dont mind.
Thanks
Terii

I ended up using window.print() as a static event to a button which named PRINT. I also hide the button so it does not print and interfere with the output. it worked!!!

I looked at the article above but it just looked like more than necessary. I searched for other options with jquery and found this jquery command. The browser ( i use chrome) needs to be set to print background color fills if you have color which I do and no headers and it looks perfectly. i’m now trying some options I found to save as a pdf from a button as well rather than have to choose a PDF printer as the final destination. JSPDF.js apparently does this but I haven’t gotten that to work yet. My ultimate goal is the save as pdf , then email to the client. I know I’ll get there but still navigating through the mirage of options. Any advice?

Rick

Hi

I use jsPDF (https://github.com/MrRio/jsPDF). You can design the PDF in JPEG/PNG and then map it into base64 code, which you then populate your form data to. It’s pretty technical stuff but its very powerful!

Hope this helps!

2 Likes

Hi @andrevr, welcome to Wappler!

We’ve integrated a client-side App Connect PDF Creator component in Wappler 6.3.0
Please check it and let us know what do you think: Using App Connect PDF Creator

Note that more options will be coming to it in the next updates!

This topic was automatically closed after 32 hours. New replies are no longer allowed.