IE11 Windows 7 Print issue after kb4021558

走远了吗. 提交于 2019-11-28 05:55:14
Thom

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.

andyfinch's workaround is also working for us. Thanks Andy!

MS has flagged this issue with "WON'T FIX" (6/15/17): https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12349663/ Update: that flag might just indicate that it's not an issue with MS Edge so it won't get fixed by the Edge developers.

Installing KB4021558 breaks printing from our website (the pages are blank, the footer shows some variant of "res://ieframe.dll/i273gyew.htm"). Uninstalling it restores printing functionality.

KB4021558 is also included in KB4022719, KB4022725 and KB4022727.

I found a workaround: if the iframe you're trying to print is visible, right click on it and choose Print preview... instead of Print... from the context menu. The preview seems to be printable (but may show only part of the frame contents).

Also, for the record, the problematic 64-bit Win7 update is KB4022719.

MS released updates yesterday (June 27th) that address it for Windows 10:

This non-security update includes quality improvements. No new operating system features are being introduced in this update. Key changes include:

• Addressed an issue introduced by KB4022715 where Internet Explorer and Microsoft Edge printing from a frame may result in 404 not found or blank page printed.

Links:

Windows 10 (Initial Release - Build 10240)

KB4032695 - Build 10240.17446

Windows 10 Version 1511 (Initial Release - Build 10586)

KB4032693- Build 10586.965

Windows 10 Version 1607 (Initial Release - Build 14393)

KB4022723 - Build 14393.1378

Windows 10 Version 1703 (Initial Release - Build 15063)

KB4022716 - Build 15063.447

Source/More info

I grabbed them from the Windows Update Catalog today, to use with WSUS.

Heres the workaround I have been using for this in IE 11:

  1. Right click frame and choose select all, or [ctrl + A] in the frame
  2. Right click and choose print preview
  3. There should be an option in your preview for "As selected on screen". Choosing this allowed me to print everything in the frame.

We were having multiple frames in the print screen and calling document.execCommand('print', false, null); could not fix our issue. Instead window.parent[frameName].document.execCommand('print', false, null); fixed it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!