'html' printing isn't working in Internet Explorer 11
When I try to print a div element using the 'html' method in IE 11, it prints the entire page instead of just the element. I get this same result when clicking on the "Print Form" buttons in the "HTML Printing" section of your website at http://printjs.crabbly.com/
I am using IE version 11.545.10586.0 on Windows 10 Enterprise. This is also happening on one of our customers, although I haven't gotten their environment information yet.
Any idea what might be causing this behavior? Is there any other information that I can provide that might give more insight to the cause?
Thank you, Jonathan
I heard back from our customer who reported this issue. They are using IE 11 with Windows 8.1.
Thank you, Jonathan
@JonathanWiest I wasn't aware of this issue with IE. Thank you for the info. I'll look into it and post any updates here.
Hi @crabbly, it's been a couple of weeks, so I was just checking in to see if you've had a chance to look at this issue yet? Unfortunately, I have to resolve this by the end of the week for our client. I don't mean to pressure you, as I'm sure you're busy, but I would prefer to use your solution rather than try to find another one. I like how simple and clean your implementation is. Aside from this one issue, it works really well!
Thank you, Jonathan
Hi @JonathanWiest, I have indeed been very busy, but I'll try to get to it today or tomorrow.
@JonathanWiest The html print issue should be fixed now. Both IE and Edge. Try the new this version and let me know how it goes: https://github.com/crabbly/Print.js/releases/latest
The html print issue should be fixed now
Really appreciate you being so quick on this, love the library.
Just noticed that v1.0.5 ended up breaking Chrome for me (prints blank PDFs), fixing Firefox for me (previously wasn't opening a new tab), and IE remains broken.
I suspect that the IE issue has something to do with the Adobe Reader plugin... becasue when I disable the plugin, IE works fine... but when the plugin is enabled, the screen just sits there and doesn't serve the PDF.
Thanks for the quick response, @crabbly! That fixed the IE issue for me. Unfortunately, it seems to have broken in Firefox though. When I click on my "print" button in Firefox, nothing happens (it does print correctly in both Chrome and IE). Now, if I visit your homepage and click on the "Print Form" button under the "HTML Printing" section, that works fine in Firefox. It appears that you're running version 1.0.4 there though, so some difference between these two versions is causing this new issue. Just to clarify, I'm just using the "html" functionality. I'm not trying to print PDFs like @jboutin is. Any idea what's causing this new issue?
Thanks, Jonathan
@jboutin @JonathanWiest I rushed into this today and couldn't test it in different browsers. Thank you for the feedback. I'll work on the new issues and try to get them fixed by tomorrow. I won't change the docs page to a new release until we test it with most browsers. Please keep testing it after I post a new update, it really helps. Thx.
@jboutin Fixed blank PDF issue with Chrome. @JonathanWiest Firefox html printing issue was fixed as well. Please try and let me know how it goes. https://github.com/crabbly/Print.js/releases/latest I'm canceling PDF print support on IE, just for now. l'll work on a better solution to prevent the blank pdfs. In the meantime, it will open a new tab with the pdf document.
:+1:
Chrome and Firefox both work beautifully, but IE still doesn't function (at all).
IE doesn't even get to finishPrint(), doesn't open a new tab with the PDF document... nothing. Thoughts?
Also -- Is there any way you can initiate the print in Firefox after it opens the PDF in a new tab?
IE works for me now. Windows 10 IE 11. What version are you using?
About Firefox, it will block the print action, because of its default viewer. Eventually this may change.
IE 11 on Windows 7.
If I modify the following line...
if (isFirefox()) {
console.log('PrintJS doesn\'t support PDF printing in Firefox.')
to this:
if (isFirefox() || isIE()) {
console.log('PrintJS doesn\'t support PDF printing in Firefox, or IE')
IE opens the PDF in a new tab.
But again, if I can't have it automatically print after opening the new tab, we won't be able to use the library for this project :(.
That was already added in my latest commit, not sure why it didn't get into the release. I'll create a new one soon. https://github.com/crabbly/Print.js/compare/v1.0.6...master
I don't have a solution for PDF printing in IE right now. How about printing HTML, any problems?
I apologize for my delay in responding. I've been at home sick. I managed to test out 1.0.7 today, and the html printing appears to be printing correctly in Chrome, Firefox and IE now! I haven't tested the PDF printing and will leave that to @jboutin. Thanks again for the quick response on fixing the html printing, @crabbly!
Great. I'll close this issue since it was for the html print, which is now working. I'll keep working on a better solution for pdf printing in IE and should be releasing new updates soon. @JonathanWiest @jboutin If you like the library, please star the project. Thank you.
@jboutin The latest version now supports PDF printing in IE. https://github.com/crabbly/Print.js/releases/latest