I develop an application asp.net mvc core 2.1.
I have this:
--------------------------------------------------------------------------------------------------------------------------------
@model Dto
@{
ViewBag.Title = "PrincipalView";
Layout = "~/Views/Shared/_Layout.cshtml";
}
...
<div class="page-container hidden-on-narrow row">
<partial name="partialView" model="Model" />
</div>
...
<button class="btn btn-submit btn-block" onclick="getPDF('.pdf-page');">Print Receipt</button>
...
--------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------
function getPDF(selector) {
kendo.drawing.drawDOM($(selector)).then(function (group) {
kendo.drawing.exportPDF(group/*, { paperSize: "A5", landscape: true }*/).done(function(data) {
kendo.saveAs({
dataURI: data,
fileName: "partialview.pdf"
});
});
});
}
--------------------------------------------------------------------------------------------------------------------------------
With the above code, I can export a partial view and save it, but I don't want that approach.
I want to export that partial view to PDF and open it in another tab or a new browser window.
Could you guys point me to the correct path?