Solution for printing an HTML5 topic from IE8?
Solution for printing an HTML5 topic from IE8?
Does anyone have a solution for printing an entire topic (not just what is visible in the browser window) when using IE8 to view HTML5 output? I have looked all over this forum and did not see any solutions, so I am hoping that someone has already implemented a solution, maybe using some JavaScript? Any help is greatly appreciated! I HATE IE
- I wish our customers would use Chrome, Firefox, or any of the other browsers!
Candee Hellberg
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Solution for printing an HTML5 topic from IE8?
That is a HUGE bug. Have you logged it with MC?
The content is in an iFrame, so I wonder if you could create a button that would identify the iFrame by name and print the contents of that frame. Here is the code that calls the iFrame:
Since the ID of the iframe is always the same, it seems you could use JavaScript to make this work.
GAAHHH! I hate FRAMES!!
The content is in an iFrame, so I wonder if you could create a button that would identify the iFrame by name and print the contents of that frame. Here is the code that calls the iFrame:
Code: Select all
<iframe id="topic" name="topic" frameBorder="0"></iframe>GAAHHH! I hate FRAMES!!
Re: Solution for printing an HTML5 topic from IE8?
Well, I'm confused! A Print Preview in Firefox gives me the same result (Contents/Index pane and the topic) as does IE8. What am I supposed to hate now? 
Re: Solution for printing an HTML5 topic from IE8?
One of my co-workers was going to contact MC about this, but I have a feeling it is IE because I just downloaded IE9 and I still get the same results, regardless if I am using Print Preview or actually printing the topic. I was not aware that Print Preview in Firefox gave the same results. I guess Chrome is the only browser right now that fully supports printing the contents of an iframe. I am only a newbie when it comes to JavaScript, so I am not exactly sure how to code in JS to get the iframe contents to print. I guess I will have to do some researching on that, unless someone has already created that code and is willing to share it! 
Candee Hellberg
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
Re: Solution for printing an HTML5 topic from IE8?
This works for me in IE9 (not tested others); it prints the topic frame, and not the whole page.doc_guy wrote:I wonder if you could create a button that would identify the iFrame by name and print the contents of that frame.
Add a toolbar button, and insert this code as the button Event:
Code: Select all
topic.focus(); topic.print();-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Solution for printing an HTML5 topic from IE8?
Why? Frames are there for a reason and they are perfectly valid even under HTML5. Sure, they are not without disadvantages, but everything in HTML has disadvantages, although for the most part those come from the moronic implementation in the various browsers.doc_guy wrote:GAAHHH! I hate FRAMES!!
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
Re: Solution for printing an HTML5 topic from IE8?
It might depend on what part of the window is active at the time you try to print a topic. For example, when you open the help the focus might be on the whole help in the browser window. When you go to a topic and scroll up or down or put your cursor in the topic to expand a toggle or something, then the focus would be in that iFrame. If you print at that point, you might just get what you're expecting.crdmerge wrote:Well, I'm confused! A Print Preview in Firefox gives me the same result (Contents/Index pane and the topic) as does IE8. What am I supposed to hate now?
I've been away from Flare for awhile and stopped working on HTML5 because it's not ready for production, IMHO, so I don't remember if I noticed any difference about printing, depending on what had the focus at the time I tried to print, but it's something you might want to try on your end to see if it is focus-dependent.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Solution for printing an HTML5 topic from IE8?
No, Lisa, I specifically enforced focus in the topic page for my testing. And yes, the Flare implementation of HTML5 is seriously not ready for prime time, even worse for merged projects.
Sigh...
Leon
Sigh...
Leon
Re: Solution for printing an HTML5 topic from IE8?
That isn't to do with Flare's HTML5 output, it's just how Firefox works.crdmerge wrote:No, Lisa, I specifically enforced focus in the topic page for my testing. And yes, the Flare implementation of HTML5 is seriously not ready for prime time, even worse for merged projects.
Sigh...
Leon
Print preview in Firefox only works for the full page; to print a frame you need to right-click the frame and select This Frame > Print Frame. (There isn't a preview though.)
The original issue raised by candeeh is about how the topic prints when you use the the HTML5 toolbar icon (which I think my post above should fix).
Re: Solution for printing an HTML5 topic from IE8?
Dave Lee: Your tip on adding a new toolbar button and assigning the topic.focus(); topic.print(); event worked great! Thank you so much!
Side note: I do not know if it works in IE8, because after frustration set in yesterday, I downloaded and installed IE9 and it overwrote my IE8 install, so I cannot test this on IE8. However, chances are, it will probably work, since I was getting the same results from IE9 that I had gotten from IE8.
I wonder why MadCap just didn't put this into their code for the Print button, since it appears works perfectly in both Firefox and IE9. I am going to test it on Chrome, once I get that installed, but my guess is that it will work in Chrome too. So again, why was this not coded into Flare? Just my two cents!
Thanks again Dave - you saved me from going bald!
Candee
Side note: I do not know if it works in IE8, because after frustration set in yesterday, I downloaded and installed IE9 and it overwrote my IE8 install, so I cannot test this on IE8. However, chances are, it will probably work, since I was getting the same results from IE9 that I had gotten from IE8.
I wonder why MadCap just didn't put this into their code for the Print button, since it appears works perfectly in both Firefox and IE9. I am going to test it on Chrome, once I get that installed, but my guess is that it will work in Chrome too. So again, why was this not coded into Flare? Just my two cents!
Thanks again Dave - you saved me from going bald!
Candee
Candee Hellberg
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Solution for printing an HTML5 topic from IE8?
Frames are valid, just as tables are valid, but that doesn't mean you should necessarily use tables to design the site's style. In this case, it feels like using an iFrame is a lazy way around loading the content into a div and using Ajax calls to replace the content of the div. An iFrame is notoriously difficult for end-users to interact with, especially if people are using mobile browsers to access the content. (Yes, I know you can create a mobile help output, but even better would be a single, responsive layout that worked for small screens and large screens alike.)RamonS wrote:Why? Frames are there for a reason and they are perfectly valid even under HTML5. Sure, they are not without disadvantages, but everything in HTML has disadvantages, although for the most part those come from the moronic implementation in the various browsers.doc_guy wrote:GAAHHH! I hate FRAMES!!
Frames make it more difficult to print, more difficult to find the source HTML of the page, more difficult to QA, etc. Do they have a place? Yes. Would the "HTML5" output have been better without them? I argue yes. A real "modern" solution would be a responsive layout with Ajax calls to replace the topic div when needed. THAT would be a sweet output.
For those who don't understand what I mean by "responsive design", here is a Wikipedia entry on the topic.
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Solution for printing an HTML5 topic from IE8?
Works for me in Firefox, but not in Chrome. In Chrome the button does nothing.candeeh wrote:Dave Lee: Your tip on adding a new toolbar button and assigning the topic.focus(); topic.print(); event worked great! Thank you so much!
-
RamonS
- Senior Propellus Maximus
- Posts: 4293
- Joined: Thu Feb 02, 2006 9:29 am
- Location: The Electric City
Re: Solution for printing an HTML5 topic from IE8?
I just wonder if it then works similarly enough in all common browsers. Also, Ajax calls means more client side JavaScript, which is notoriously slow. Although I don't see a way around it in general. My objection was more that I got the impression as if you think iframes are not valid HTML5.
New Book: Creating user-friendly Online Help
Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U

Paperback http://www.amazon.com/dp/1449952038/ or https://www.createspace.com/3416509
eBook http://www.amazon.com/dp/B005XB9E3U
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Solution for printing an HTML5 topic from IE8?
Ah. I get it. Yeah, I'm aware that they are supported in HTML5. I was just disappointing to find them in "HTML5" output from Flare.RamonS wrote:I just wonder if it then works similarly enough in all common browsers. Also, Ajax calls means more client side JavaScript, which is notoriously slow. Although I don't see a way around it in general. My objection was more that I got the impression as if you think iframes are not valid HTML5.
Re: Solution for printing an HTML5 topic from IE8?
Doc_Guy
If this does not work in Chrome, then we can't use it because quite a few of our customers use the Chrome browser.
Does anyone know of a JavaScript solution that works across all broswers? We are in desperate need of being able to provide our users with a way of printing a single topic (all of the topics contents, not just what is visible on the page.)
If this does not work in Chrome, then we can't use it because quite a few of our customers use the Chrome browser.
Does anyone know of a JavaScript solution that works across all broswers? We are in desperate need of being able to provide our users with a way of printing a single topic (all of the topics contents, not just what is visible on the page.)
Candee Hellberg
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
Sr. Communications Analyst
LexisNexis
Raleigh, North Carolina, United States
Re: Solution for printing an HTML5 topic from IE8?
Don't use HTML 5 output?candeeh wrote:We are in desperate need of being able to provide our users with a way of printing a single topic (all of the topics contents, not just what is visible on the page.)
Inge____________________________
"I need input! - Have you got input?"
"I need input! - Have you got input?"
-
BrianBAtCeres
- Propeller Head
- Posts: 13
- Joined: Fri Jun 12, 2015 1:57 pm
- Location: Thousand Oaks, CA
- Contact:
Re: Solution for printing an HTML5 topic from IE8?
Still doesn't work in Chrome!doc_guy wrote:Works for me in Firefox, but not in Chrome. In Chrome the button does nothing.candeeh wrote:Dave Lee: Your tip on adding a new toolbar button and assigning the topic.focus(); topic.print(); event worked great! Thank you so much!
Thanks,
Brian
