Pdf generator/export

Hi @George, @patrick & @Teodor,

is there any chance of a realization of this request?

Would the NodeJS implementation make this easier?

I‘m very interested in a serverside solution within Wappler without using an external API.

6 Likes

I think it would be cool to have a pdf builder integrated into Wappler.

10 Likes

Looking forward to having this feature in Wappler.

3 Likes

Hi Dave,

I came across this post when searching for a way to generate / export PDFs on a website. Thank you for the recommendation.

Based on the Kendo demo, I have been able to create an html and download the generated PDF on a test webpage. The PDF generation and download work as expected on the desktop, however, a PDF document can’t be downloaded on a mobile device with Kendo.

Have you been able to generate and download a PDF on mobile devices with Kendo?

I use html2pdf.fr and it works well both desktop and mobile, but would much prefer a native Wappler PDF generator :smile:

4 Likes

Thanks for the recommendation. Yes, a native Wappler PDF generator will be another great addition to the application :slight_smile:

I tried to download the pdf again on a mobile device and it worked. I had some JS and CSS libraries in the html head tag that were causing the issue.

I have also used this recommendation from @ben to add a button that provides users another option to print / save as a pdf. It is working on all types of devices.

I will be binding components on the PDF to a database. There are a couple of improvements I would like to make in the code:

  1. Dynamically update the Exported file name with a couple of field values from the database - use a variable in the JS function and bind it to fields in the database to always generate a unique pdf filename
  2. Open the PDF automatically on devices after a download has been completed

Could someone please assist me if something similar has been done in their projects?

I have come across an issue when generating and downloading PDFs with Kendo.

The images download correctly if these are included in the html page from a local source (Image Properties -> Src -> local image folder).

However, when I include images in the html page by adding a data src in Dynamic Lazy Load Attribute; the images display correctly in the webpage, but when I click to download the page as a PDF (Kendo PDF Export library), the images are not included in the download.

Has anyone come across this issue with Kendo pdf export?

Yes works fine here but the pad we have in the office has Adobe CC installed on it so not sure if that is making a difference (Adobe Acrobat DC). They save to the download directory on the device. Some style issues occasionally but we seem to have worked around them for now.

We experienced this problem and found no way around it as the full document has to be loaded within the page for images to be displayed.

Hi @Dave,

Thanks for your response.

I decided to go with the window.print function as download PDF functionality was not including images (hosted on a CDN) on the page when downloaded.

After some trial and error, I have been able to write an html code that fits nicely on a single or multiple pages when printing or saving as PDF. This also works well on mobile devices.

2 Likes

Hi @guptast, as mentioned earlier, it is worth looking at html2pdf.fr

This example PDF is auto generated using a mobile phone, it uses png, jpg and svg graphics.

1 Like

Thanks for your response.

I had a look at this PDF generator. My understanding is that this software needs to run PDF generation process on the server. I don’t have a programming background, so, I wanted to work with options that provided me client-side functionality :slightly_smiling_face:

Just bumping this popular feature request as it’s been some time now. If it won’t receive much attention, any recommendations on the best or simplest library to integrate with (rather than api)?

Great library Max!

Thanks Dave. It would be nice to have a server side module, similar to the options available for files. It’s a shame as this request is over 2 years old now and still no news on it potentially becoming a feature

2 Likes

Try this solution for @sid

1 Like

Hi @George, @Teodor & @patrick,

Is there a chance that this feature request will be realized? If yes, I would be happy if you could give a timeframe.

I’m looking for a server action for NodeJS with the possibility to use repeats on the server side. I have automatically generated reports with a cronjob which are generated with mPDF on an “old” PHP site which was not yet brought to Wappler. I want to recreate it in Wappler with the NodeJS server model and need this last piece of my puzzle :slight_smile: .

Marcel

1 Like

@MH2ag,
Have you tried the extension we released? Link just above your post.
If you have, could you share what is missing so we can try to improve it.

I tried it, but like I wrote I need the possibility to use repeats on the server side. I didn’t yet see how this would work. Did I overlook something?

From our understanding, the concept of repeats is not something that is related to HTML to PDF generation.

More powerful report generators have a complex UI of their own to set repeatable data bindings and other complex designs for the report. Something like Crystal Reports come to mind.

The logic here is to generate your HTML and supply that to the extension.
You can use repeat in server action and set value to first generate your table HTML. Then just pass that to the extension.
Something like this:
Repeat in eMail body

You are correct, that this is not related to HTML to PDF generation. I know that this is a problem of using repeats on the server side. This of course also applies to the eMail body.

I know that there are workarounds for this (like in your link), but I would prefer a Wappler solution before I start. I was hoping that if Wappler would create a server side action for generating PDF’s they would also integrate a solution for server side use of repeats.

As the Wappler team didn’t post anything to this thread for a long time I wanted to make sure if it is on their timeline or not. If it’s not I would look into the workarounds.

1 Like