IE11 print margins in iFrame
See original GitHub issueOutside to iFrame, and with outher browsers it’s all ok! Into IE11 iframe not.
<iframe src="http://mozilla.github.io/pdf.js/web/viewer.html"></iframe>
Configuration:
- Web browser and its version: IE11
- Operating system and its version: WIN 10
- PDF.js version: 1.7.225
- Is an extension: -
Steps to reproduce the problem:
- Open the official demo page in a iframe with IE11
Print outside iframe:
Print into iframe:
Wrong:
Could you help me? thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
IE11 Printing website loses lines at the bottom of every page
Made sure overlow was always visible; changing margins in print preview of IE11; Removed all styles entirely and there was still cutoff from ......
Read more >float | CSS-Tricks
The float property in CSS is used for positioning and layout on web pages. A common usage might be floating an image to...
Read more >iFrame Resizer - GitHub Pages
Listen for resize events from the parent page, or the iFrame. Select the 'child' value if the iFrame can be resized independently of...
Read more >IE 11 - Post June 2017 Update - Cannot print iframe
When our users are printing from in our application, they are unable to print the iframed content they are viewing.
Read more >Firefox & IE creating extra page when printing - HTML & CSS
There are no blank pages for me in Chrome/FF33/IE11. The second page htat prints out only have two paragraphs on it so is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While I’m not entirely sure why, IE11 (and older version of IE) has issues with using
window.print
in an iframe. Usingwindow.document.execCommand('print', false, null);
seems to get the desired results, but is not supported in Firefox.If you are building pdf.js from source, you can change
print.call(window)
inpdf_print_service.js
to this:For a more complete solution, you might also want to check if you are in an iframe.
Closing IE11/Edge (non-Chromium-based) issues in response to #11211. Please note that, as outlined in https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support, only bugs which completely prevent the library and/or the default viewer from running will be accepted.