Solved

How Do You Print an Entire Page Using JavaScript Print Functionality?

Posted on 2014-09-11
4
202 Views
Last Modified: 2014-09-22
I am only able to print the part of the page that is visible using JavaScript window.print() functionality.  I need to know how to print the full web page - including the contents the user has to scroll to get to.

How can this be done?

Thanks,

Dan
0
Comment
Question by:danielolorenz
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
"JavaScript window.print()" should be opening the print dialog on the target machine.  JavaScript itself does not do any direct printing.  I usually use the "Print Preview" dialog to print what I want.  It will still print in pages because that's what printers do.
0
 

Author Comment

by:danielolorenz
Comment Utility
I do not have the print preview dialogue.
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
Although you can't open it with JavaScript, every browser that I know of has Print Preview on the File menu.  That includes Firefox, IE, Safari, Opera, and Chrome always opens it's own print preview for printing.  In addition, if I press Ctrl+P here in Firefox, the checked option is to print all pages.
0
 

Author Closing Comment

by:danielolorenz
Comment Utility
Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now