While exporting my aspx
page to pdf, at the top right corner of the page, I am getting the url
of the page and at the bottom right corner, it is showing datetime
. How can I remove this from the pdf page?
And I have to reduce the left and right margin of the pdf page and also change the fonts size? Is it possible?
<div id="printIt">
// data grid
</div>
<asp:Button ID="btn_print" runat="server" ClientIDMode="Static" Text="Print" OnClientClick="printPage();" />
js code
function printPage() {
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.getElementById("printIt").innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = newstr;
window.print();
document.body.innerHTML = oldstr;
}
How can I modify this print function to::
1. remove url and date time from top of the pdf
2. set left and right margins for the pdf page
3. set font size and font type for pdf page