Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Forums] Downloading images as a PDF

$
0
0
Hi,

I have a question regarding the components currently available to convert from HTML to pdf.

I have a webpage that has a table containing several pictures, loaded into the table from the DB. This page is "dynamic" in the sense that the table changes its contents based on which users are logged in (each user has a photo bucket, so to speak).

What I want is that when the user clicks on a button, it gets redirected to this screen (which is loaded with the appropriate content) and the download of a PDF file containing these images happens immediately.

To download the images Im curentely using the javascript command window.print() which works fine, but, I would like NOT to have to press the Save As PDF/Print as PDf button. I'd like the download to happen immediately without any subsequent user interaction.

I have access to the binary content of each picture, but, I cant use the download widget with the app type set as PDF because he wont retain the tabular layout nor open the PDF (keeps saying incorrect format).

However, I've discovered this library: https://parall.ax/products/jspdf which does exactly what I want.

Is there any way to use this library in my app via some Javascript coding?

Best regards,

Bruno

Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>