Implement a print function that can print complete pages
|Reported by:||Nicklas Nordborg||Owned by:||Nicklas Nordborg|
There is a problem with the current BASE GUI implementation when printing. Due to the use of <frames> and absolutely positioned content, scrolling happens in a <div> tag when the information doesn't fit inside the visible browser window. This affects printing and browsers will only print the first page since from their point of view that is the only page.
This makes it impossible to print anything but the first one or two diagrams in the "Sample processing statistics". We need to solve this in Reggie for now (until BASE comes up with a generic solution). The current idea is to open a new window and then copy the printable contents into that window. This has the added benefit that it will allow us to get rid of the menu and other things that are generally not needed/wanted in the printed output.
Simply copying the
innerHTML is a good starting point, but there are some issues:
- We need to decorate with proper CSS to not loose the styling of certain elements.
<canvas>elements need special handling since that drawing is not included in the copy.