Hello @salman-hammed
Thanks for taking a look
I tried saving, reloading, used new inputfield, copyed the html code and pdf.jsw code again without succes
If i find the time today i will try it again but tomorrow is my wedding so lots to do today
@harelmoshe@salman-hammed
I tried reinstaling it before and didn’t work.
now today when i started my website and tried it it suddenly worked.
now when i looked on the pdfgeneratorapi website i sa that there is a limit of 500 downloads a month.
otherwhise its 59$.
is there an free alternative for it to have more then 500 downloads?
or is there a way to just download the page as pdf?
i should also be able to save it to the website so they can download it later.
@volkaertskristof There is a free alternative but i don’t have a tutorials on it
check out http://pdfmake.org/
but it will require to write code to create the PDF
you cannot use the drag and drop like in pdf generator api site
@salman-hammed
Thanks for the link,
i will take a look and hope to figure out how it works.
the drag and drop from PDFgeneratorAPI is a nice feature but is not realy needed.
its just to have an order lst for our customers.
If i find a way to make it work i might make a tutorial myself and you can share it on your website.
You can try pressing “ctrl+p” the user can either print or save it as pdf.
As of now that is what i am doing. I just layout my page to have a print ready layout hehe
Thanks @jeffersonuy
i have tought of that idea to.
its easy and straight forwad
but
atm not all the details the customers need are on my website.
i want to be able to send it by mail later on to so they can easly download it on their mobile phone if needed.
so its an option for now but for the future i really would need the pdf to be able to downloade.
hi kristof, i found simple npm pdf maker . https://github.com/MrRio/jsPDF
you can embed it inside an html element as i did :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.debug.js" integrity="sha384-NaWTHo/8YCBYJ59830LTz/P4aQZK1sS0SneOgAvhsIl3zBu8r9RevNg5lHCHAuQ/" crossorigin="anonymous"></script>
</head>
<body>
<div>can you print me please???</div>
<script>
var doc = new jsPDF();
var elementHandler = {
'#ignorePDF': function (element, renderer) {
return true;
}
};
var source = window.document.getElementsByTagName("body")[0];
doc.fromHTML(
source,
15,
15,
{
'width': 180,'elementHandlers': elementHandler
});
///you can also save the doc file with doc.save();
doc.output("dataurlnewwindow");
</script>
</body>
</html>
if you want to dynamically print different pdfs you can create div element inside the body and then manipulate its innerHTML as you wish → append it to the body element ->query selector it varsource=window.document.querySelector(“my-amazing-div”); → load it with doc.fromHTML and then save it with doc.save()
Hi! I tried this but seems that for Chrome is not possible to download anything enveloped by an iframe tag: https://www.chromestatus.com/feature/5706745674465280
Is there any way of changing the iframe tag in order to add ‘allow-downloads’ flag from the htmlElement?