Why is it that browsers do not provide a mecanism to set the printing defaults regarding headers and footers from within the app?
Web apps are fully fledged apps nowadays, and modern browsers are capable of sending a very well formatted page to a printer (or even download it as a PDF), but web apps cannot rely on this method because browsers don't allow them to control the metadata completely.
Current possibilities don't allow websites to store the printing settings along with the report or file on the server.
Each browser provides it's own mandatory dialog form to set printing settings that could be replaced when needed by a more convenient experience: in-app options, adapted to the use case, cloud-persistent and consistent along different browsers.
The options that are currently available are:
- Delegating part of the work on the user (i.e., having him/her change the metadata options and paper size/orientation themselves).
- Using other methods that can quickly become too expensive and complicated, like generating PDF's on the server for the user to download.
Opting for number 1 is not always our decision. As professional web developers, the final users are usually not our direct clients, but our client's target audience. Also, we would be forcing the final user to do extra work. Experience says that it wouldn't be done and reports will be printed with the default settings of the browser, usually with headers and footers that the user don't really want (and the associated paper waste if he/she decides to print it againg without them).
The resulting reports never look the same, and programmers have to maintain two versions of every report.
Moreover, generating PDF's on the server can be really slow and resource consuming.
So, is there a compelling reason why browsers programmers opted not to support this kind of customization?