In Chrome, when hitting Ctrl + P you can choose 'Save to PDF'. The default file name is equal to the title of the html page the user wants to print. Can this be changed, without changing the actual title of the html page? I'd like to have a date & time in the PDF's name, but I don't want the date & time in the title of my html page.
So if you can put a print button in somewhere and link it to a function similar to the following:
function printWithSpecialFileName(){
var tempTitle = document.title;
document.title = "Special File Name.pdf";
window.print();
document.title = tempTitle;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With