Apologies for the slightly vague question but I'm pulling my hair out. Since this update we have had numerous calls regarding printing from our web app. Our web app uses an iframe and we use css @media print to hide all but this iframe for printing purposes. Since the update the user receives an Error 404--Not Found instead of the actual page. It would seem from the network trace that IE creates a temp .htm file in the local directory like D3CD911.htm, it then downloads css/js resources and then finally it makes this call /D3CD911.htm. This is making a call to www.mywebsite.co.uk/D3CD911.htm. This obviously does not exist on the website so the 404 is returned. I struggling to find a pattern to the problem and it doesn't seem to be affecting other public sites. I think the issue is with window.print() method. I can semi reproduce it here at https://www.primefaces.org/showcase/ui/misc/printer.xhtml. If you click the print button you will get the error. Although this is using the jqprint javascript function if you then use the browser print button it also fails.
Any guidance would be much appreciated.
In IE11 , by selecting File Menu > Print Preview displays a new window where we can visualize and modify print settings, level of zoom we'd like to use or even select "Shrink to fit" or a custom percentage.
Click the Security tab and uncheck the checkbox beside Enable Protected Mode (requires restarting Internet Explorer) Click Apply , and then click OK. Close all open Internet Explorer windows, and then restart Internet Explorer. Browse to a website and try test printing a page while running as the Administrator.
Print pages by pressing Crtl + P on the keyboard or select the Tools button > Print, and then choose Print.
Click the “Tools” button in the upper-right corner, roll over the “Print” command, and then select the “Print…” command in the side menu that appears to open the “Print” dialog box.
andyfinch, you're a genius! The following code appears to work for a print button contained within a frame:
function Print() { if (document.queryCommandSupported('print')) { document.execCommand('print', false, null); } else { window.parent.<framename>.focus(); window.print(); } }
Update: Microsoft have now released a patch: Microsoft IE patch
Just wanted to summarise the workarounds I've found and which have been posted here.
1) If you are using your own print button change to use document.execCommand('print', false, null);
. Test support using document.queryCommandSupported('print')
and call window.print()
if not supported (Prob just Firefox)
2) Use Print Preview. Additionally select the part of the page to print, right click and select print preview. Then select As selected on screen
.
3) Use another browser like Chrome
4) Uninstall the update
5) Wait for Microsoft fix. Their KB page KB Link has been updated with this as a known issue. Therefore you assume a fix is on the way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With