Download as PDF?

Hi, I have a print button on my site - wondering if there is a way to add a download as PDF button within Wappler?

1 Like

This has been discussed and is subject of a feature request. Alternatives are discussed in this thread.

1 Like

Wow, TCPDF looks like it is just what I want to do - plus it looks like it supports other formats like JPEG which would also help me. I see it needs to be installed on my system. That is not problem (commands for that in photo below).

But I don’t know how to attach it to and make it work in/on my web page(s)?

Can anyone help me… if too embarrassing to help me in public someone can send me a private message. I know the pros don’t like answering newbie questions in public - guess it is like Albert Einstein being asked to help a 6th grade math student. See funny pizza picture below…

We need a “help a newbie” category :slight_smile:

looks like one for @ben

1 Like

There is no need to install except to download the PHP PDF class as can be seen here http://www.fpdf.org/. From there you can follow the video from the other post.

In the past I used PHP/MySQL to populate the document. I do not know how this is done with APP Connect and unfortunately am too buried in client activities to experiment. If I get a chance over the weekend I’ll report back here.

PS Thanks @Hyperbytes for dobbing me in. Just joking Brian, your work for Wappler has shamed me. :blush:

1 Like

Thanks for helping me. I looked at the files and watched the video - I also read the tutorials but I don’t understand how to get going.

I’m not even sure I have explained what it is I’m trying to do. I don’t want to generate a PDF for myself - I’m looking for a way the people that visit my pizza calculator web page can download a PDF or JPEG image (of the calculator page after they have filled it out).

Right now everything is gone once they leave the page - at some point I’m hoping I will be smart enough to set up users and provide a way for people to use the calculator and then save their results so they can come back to it later (or send it to someone they are helping learn how to make different styles of pizza).

I know most browsers can save as PDF and people can take screen shots, but the community of pizza makers I’m a part of are generally not that tech savvy, plus it is hard to do some of that on a phone or tablet.

The calculator page I’m talking about is here - it calculates dough ingredients for pizza recipes!

www.mypizzamaster.com/calculator.php

I’m hoping there is an easy way to do that since my skill set when it comes to coding is very limited (I’m more comfortable with hardware).

Anyway - fingers crossed I can figure this out or a kind soul will help me :slight_smile:

PS. I’m sure Wappler can do it - the problem is lack of experience on my part.

Using the Print button with the functionality that you have applied to it, one can already choose to send the finished document to a printer or to a PDF file.

Yes works great on a Mac and works like that on newer Windows systems - I was trying to figure out if there was a way to have a dedicated button for PDF since some people have asked me how to do it and don’t even know they have that option.

If impossible I can just keep explaining to folks they can do that way or maybe put it in a modal.

.JPEG would be a good option to have as well, that is why I was interested in figuring out if TCPDF would work for me…

I confess i would love an option to save as pdf at server level so the pdf can be mailed as an attachment (in the same way there is image and zip processors available).
I have many customers requesting the results of database queries be sent to customers as formatted pdf files

1 Like

I have created PDF’s as an attachment to an email, like an invoice or a certificate. Other instances include hard copies of forms that have been filled in. The PDF is populated from the database.

As an example, many, many moons ago (Adobe Spry and ADDT era) I devised an online system to ensure that Occupational Health and Safety systems were followed. Back then, it was usual to keep hard copies as proof of their compliance. For this reason I created PDF documents using the method as outlined above.

This is the Control Panel

Clicking on the Control Register shows the following document wyh the PDF button

And this is the PDF document showing the hazard items and risk control methods for their hard copy files.

As you can see, some of the entries go back to 2010. The system is still in use, although I happen to have picked old entries.

So, to answer your question, it would work for you, but it does require a database for safekeeping.

Maybe this will work again :slight_smile:

2 Likes

Have a look here https://www.dmxzone.com/go/22488/exporting-dynamic-html-table-to-pdf

This also looks super easy to impliment

Oops!

Thanks for trying to help - I appreciate it very much. I have given up on trying to get this to work - and since most OS already allow saving to PDF I’m now focused on saving the important parts of the page to the clipboard. I’m making good progress with that and asking for some help with that process here…

I’m also interested in mailing capabilities and I noticed in DMX they did have a mail to function - did that migrate over to Wappler?

Thanks again to everyone for the support and your time, please don’t give up on me - I am making progress…

Not tried it and not in office to look but first thing that comes to mind is create the whole thing within a variable then bind the variable?

The variables are already defined and everywhere on the whole web page - are you saying scrap everything and start over. I don’t think I can do that, I have learned a ton over the last few weeks but @drymetal did the heavy lifting to get me going on my web page and I would hate to toss that away.

I have been adding features every few days trying to implement things the users are asking for. The copy to clipboard is by far the biggest request (and the hardest). If I start over I might never get it anywhere as nice. Maybe I’m not following you?

BTW, the original copy to PDF was just a temporary bandage until I could figure out the copy to clipboard I mentioned.

Obviously I am not suggesting to start over, i don’t know exactly what you are doing, your description is basic, but you asked about adding static text to a binding. All i am suggesting is concatenation of variables i.e Var1+‘Some static text here’ and then binding the variable with the static text already in place.

1 Like

So it looks like I just need to put single quotes around my static text (I’m not a programmer so not sure about the correct syntax). Is that correct - what about inserting line feeds, spaces and such? What can I read to become more knowledgable on this topic?

Depending on where you are binding it you can just do as i said, var1+‘text’ or you may have to use the javascript concat function (info in link).

1 Like