r/programmingrequests • u/networkhappi • Feb 16 '17
[REQUEST] Simple JavaScript (or something front-end friendly) code that prints page of a website at 7:00pm every day?
I have a webpage that acts as a report that parses a .csv sheet and then colorizes it based on numeric thresholds (0-50 is green, 50-100 is yellow, +100 is red).
The problem is, you won't get the colors if you open the .csv directly, the colorization is done through a JavaScript framework for data visualization.
I would like a simple code that I can add to the .html that just prints the webpage 7:00pm every day and exports it either in an image format (.png, .jpg) or more preferably a .pdf format.
The webpage is in an IIS web server environment.
3
Upvotes
1
u/ErezYehuda Feb 17 '17
In all browsers that I know of, JS can bring up the print dialog, but can not authorize an actual print, for numerous good reasons. JS would save you maybe 3 seconds at most from bring up the dialog yourself; you may as well just do it manually.