Good day.
Faced a nontrivial task - to write a program for editing a document (estimated program) with the subsequent printing of the result (provided there is no Internet). I decided to make a browser-oriented solution, but I started to catch the “feils” at the stage of printing the document.
I use localStorage to store editable versions, but when I try to print, I start “katavasiya” - each browser tries to define the rules and markup of the printed sample in its own way, @media print does not save, Opera on MacOS does not want to print more than one page at all.
Gradually, I came to the conclusion that you need to either send data to a third-party class to generate PDF (because this format is ideal for printing), or to make a-la screenshot of the entire page in *.png/*.bmp/*.tiff
. But the trouble is that all the solutions found are tied to a POST server, and it’s critical for me to use the local version without having to install a web server.
In general, if you come across something similar or have fresh ideas, I will be glad to advice.