• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing Web Pages  RSS feed

 
Ambreen
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making a web browser for my final project. In the menu item i had also put a menu for print. I dispay web pages in JEditorPane but when i use Print class from awt and its interface printable, the whole screen is displayed instead of the document i.e the web page. Please tell me how to go about it.
 
Wayne Hefner
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do this by getting the default toolkit from which you can obtain a printjob and retrieve the graphics object. Then you can redraw your page to this object and then print the printJob.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ambreen,

Please re-register with a username that follows the JavaRanch Official UserName Conventions. Your username is required to be in the format "First Name" + space + "Last Name".

Thanks,

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!