Open jmzaleski opened 7 years ago
works in chrome okay
I have tested the printing functionality on Chrome (where it was developed) and Firefox on Linux. The same issue occurred with Firefox on Linux, but not with Chrome. Hence, I believe that this is a browser issue (not a system issue).
Specifically, I believe that Chrome simply loads PDF content faster than Firefox does. I believe that, when the print dialog is produced, either loading is stopped, or loading continues but only what was loaded up to that point is printed.
Since we only wait for the page to load (i.e. the DOM content and resources) before generating the print dialog (see https://github.com/uoft-tapp/tapp-cp/blob/master/app/javascript/cp/fetch.js#L522), the embedded PDF content may not have finished loading at that point.
Or maybe Chrome waits for the embedded content to load before firing a load
event, but Firefox does not?
I have done some research, but haven't found a way to tell if a PDF has finished loading without using an external library.
Our alternative would be to simply open the PDF in a separate window without generating a print dialog. This would allow it to fully load, and then Lisa would have to click the print button herself.
PDF of contracts were previewing as blank in browser preview. Lloyd thinks might be something to do with pdf "layers". (Adobe acrobat shows and prints correctly, supporting Lloyd's theory.)
maybe rely on adobe client opening automatically on downloaded PDF?