My project is core but this is really just simple view. I want to convert some simple html to pdf and "Save As" to the local machine. I dumbed down my actual view fo the example but please help me understand why this works (pdf is generated and saved to downloads) on my local machine but not in production (tried in Chrome/Edge/IE).
Heres a dojo link; http://dojo.telerik.com/@bdaun1@gmail.com/ (doesn't work here either... only when I run in dev on my machine)
Thanks!
BD
<!DOCTYPE html>
<
html
>
<
head
>
</
head
>
<
body
>
<
div
class
=
"box wide hidden-on-narrow"
>
<
div
class
=
"box-col"
>
<
button
class
=
"export-pdf k-button"
onclick
=
"getPDF()"
>ExportToPDF</
button
>
</
div
>
</
div
>
<
div
class
=
"page-container hidden-on-narrow"
>
<
div
class
=
"pdf-page"
>
<
div
class
=
"pdf-header"
>
<
span
class
=
"company-logo"
></
span
>
</
div
>
<
div
class
=
"pdf-body"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-8"
>
<
p
>Test Area1</
p
>
</
div
>
<
div
class
=
"col-sm-12"
>
<
hr
/>
<
h3
>Purpose Statement</
h3
>
<
p
>Test Area2</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
script
>
function getPDF() {
kendo.drawing.drawDOM($('.pdf-page')).then(function (group) {
kendo.drawing.pdf.saveAs(group, "OrgOverview.pdf");
});
}
</
script
>
<
style
>
.pdf-page {
position: relative;
margin: 0 auto;
padding: .4in .3in;
color: #333;
background-color: #fff;
box-shadow: 0 5px 10px 0 rgba(0,0,0,.3);
box-sizing: border-box;
font-family: "DejaVu Sans", "Arial", sans-serif;
}
.pdf-header {
padding-bottom: .2in;
margin-bottom: .3in;
border-bottom: 1px solid #e5e5e5;
}
</
style
>
</
body
>
</
html
>