Closed andyhill2 closed 3 years ago
My framework is UniGUI and I resolved this problem by adding a timing delay.
My solution worked for Safari and Chrome but NOT EDGE
My solution worked for Safari and Chrome but NOT EDGE
Can anyone shed light on why ?
Hi @andyhill2, I tested html print in Edge on Windows 10 and it worked. What is your OS and version?
Firstly Windows 10 Pro (latest update) for the Desktop Edge and Chrome Testing.
I am using the UniGUI Framework (wrapper around Sencha) under Delphi (Object Pascal) for my WebApp.
For Desktop Chrome and Mobile Safari to work I have to add a delay as follows:-
htmFrame.JSInterface.JSCode('Ext.defer(function(){'#1'.iframe.contentWindow.print()}, 100);');
There was some chatter saying the Print function executes before the page is rendered, however no amount of delays allow Desktop Edge to print (button just blinks when pressed).
htmFrame.HTML.Add(' <button type="button" onclick="printJS({printable: [''myTable''], type: ''html''})">Print via: Mobile Safari -or- Desktop Chrome</button>');
Mobile browser support is still quite weak due to different behavior between mobile and desktop browsers Api. Unfortunately. Closing this is favor of #33. I hope we can eventually improve this.
iPhoneX Safari - pure html, does not find Print Dialog and therefore fails to print.
Works fine on Desktop Chrome.
Please advise