Menu Button for Email PDF of current page

As a Builder I would like to be able to set up a workflow that on a Live App page, I could add a button to send the page as a PDF to an email address.

Scenario: We presently are able to Print a page and within our desktop Print to PDF, then email the PDF.

But, it would be great if you could configure a button that provided for email rules that attached a PDF of the displayed page.

Have you solved this ?

No smart solution from my side. Just manual save PDF and email.

Looking for this facility desperately. Further download as pdf button of the displayed page will be highly beneficial.

1 Like

Hello! If anyone has thought of other workarounds for this, I appreciate if you could share them :slight_smile:

Did you get any replies? I too need a simple ā€˜email a pdf versionā€™ of a page (eg supplier orders). Thanks, Calvin

Hi,

We did this in a different way. Sending pdf link in the email when user clicks it asks user to print or download pdf.

Itā€™s just an HTML page with predefined design and dynamic values based on the record.

Regards,
Sunny Singla
ssingla1985@gmail.com

Hello, Sunny! Iā€™m very interested in your approach but I didnā€™t quite get the idea. Can you explain a bit more? thanks!

Hello Nathalie,

Sure In this we can send an email with a link to Html page.

Like Click here to open pdf

When you click it ask you to print or save as pdf.

Regards,
Sunny Singla

Ahh I get it!
I think itā€™s not suitable for my use case because I canā€™t put the information in a public linkā€¦ Iā€™d have to consider creating user accounts for the recipients, I guess.
Itā€™s a great idea, though. Thank you!

Hello Natalia,

There is a way to encrypt as well. We can also make this password protected as well.

So based upon that password we can encrypt and decrypt.

itā€™s up to you how to make this more secure.

Regards,
Sunny Singla
ssingla1985@gmail.com

I still would really like an email a pdf version of a page option.

Like you @AdrianBell27622 I am still looking at something better than just a page that saves and manually having to save and print to PDF. Also, I notice that the name of the file when I go to save the page is just the title of the page, now looking to see if I can change that too for ease of use.

Was also playing around with your suggestion @Sunny_Singla but for my application, we need a pdfed version anyway for audit, so really comes back to PLEASE can we have an ā€œemail a pdf version of a pageā€ option?

Hello Calvin,

We can send HTML page links. On opening, we can either print or download pdf. But I donā€™t think we are able to send dynamic pdf directly using knack. Either we can use 3rd party API or a Custom server-side application.

Regards,
Sunny Singla

1 Like

I would like more information on how you set this up Sunny. Can you assist?

Hello Kim,

Sorry, for the delayed reply. I create a html page where we can send dynamic values using query string. and when the page load we call a print function which prints that HTML page(using button or directly after load).

see below url

http://50.28.104.203/report.html?Zm5hbWU9c3VubnkmbG5hbWU9c2luZ2xhJmRvYj0wOS8wMy8yMDAyJmR0PTA0LzE5LzIwMjEgODoxMmFtJnRlc3RpZD00Nzk5MDUmcmVzPVBlbmRpbmcmY051bWJlcj0wMkQyMTk1NzMyJmxzPUJlYWNodHJlZSBNb2xlY3VsYXImaGNhcmU9QW5jaG9yYWdlJmxhYm5hbWU9QmVhY2h0cmVlIE1vbGVjdWxhciZoYWRkcj1GYWlyYmFua3MgSW50ZXJuYXRpb25hbCBBaXJwb3J0JmhwaG9uZT0oOTA3KSAzNjUtMzE0MCZ0cGVyPVBDUg==

we can make same url in knack as well .

Regards,
Sunny Singla

1 Like

Thank you Sunny! Havenā€™t gotten a chance to work on it but appreciate your quick response. :blush:

Are you available for hire to help me create a PDF that is printable/downloadable like the one in this thread. Iā€™ve got my app built but printing is a huge issue. I need to print about 5 different types of documents each time we dispatch one of our truck drivers. I have two different apps I will need this for but for now Iā€™m just working on one trying to get it to work.

I was looking for something more like this @Sunny_Singla

Hello Anna,

Sure you can email me or add me on WhatsApp for further discussion.

Regards,
Sunny singla
ssingla1985@gmail.com
+919855089359

Hello Kim,

You need to create a html page and upload it into the knack object. If you want a simple print button then easy.

create a field in HTML like

and update values of fields using
var hrefContent = window.atob(decodeURIComponent(location.href.split(ā€œ?ā€)[1]));

    var urlContent = hrefContent.split("&");
    for (var x = 0; x < urlContent.length; x++) {
        var obj = urlContent[x].split('=');

        try {
            var textcontrol = document.getElementById(obj[0]);
            textcontrol.innerHTML = obj[1];
            textcontrol.value = obj[1];
        }
        catch (err) {
            console.log(obj);
        }
    }

Then last call window.print()

Regards,
Sunny Singla

2 Likes