In Chrome, when you press Ctrl + P, you can select "Save to PDF." The default file name is the title of the html page that the user wants to print. Can this be changed without changing the actual name of the html page? I would like to have the date and time in the name of the PDF, but I do not need the date and time in the title of my html page.
So, if you can place the print button somewhere and associate it with a function similar to the following:
function printWithSpecialFileName(){ var tempTitle = document.title; document.title = "Special File Name.pdf"; window.print(); document.title = tempTitle; }
This is the functionality of the print-to-PDF printer driver, and as far as I can verify, you are not in control of it. So, unfortunately, the default file name will be the page name ...
Source: https://habr.com/ru/post/1206788/More articles:ASP.Net ReadOnly Session - asp.netHow to write a Jasmine unit test for an IFrame - karma-jasmineHow to provide a border for text in a PHP GD library - phpCss Background Video - htmlCreate documentation comments for typescript in Visual Studio - visual-studioTHREE.js: 2xMeshes using the same vector as position - javascriptGoLang Pointer Performance - performanceHow can I refer to a variable of the same type in annotations of different types? - haskellhttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1206792/promoted-build-plugin-deploy-artifacts-to-repository&usg=ALkJrhi8TzYcAG8LlYub-B1d0DIAzC6SIAHow to create a universal infrastructure in xcode6 - iosAll Articles