Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

New 1.4 Printing API

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If anyone has a good link on a good tutorial for printing with the 1.4 API set I would really appreciate it. I have read the API and I have read this article:
http://www-900.ibm.com/developerWorks/cn/java/j-merlin/part10/index_eng.shtml
But I still am having a hard time and I need a more in depth example.
Thanks
 
Author
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chapter 3 of my book, JDK 1.4 Tutorial, has a tutorial on using the Print API. You can download it at http://www.javalobby.org/members/jdk14/index.jsp .
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Greg. I am downloading it now and am going to enjoy it.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg B.
- What!! No link to JavaRanch on Embedded Thoughts!!
And I thought that you loved us .
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ahhh, Busted. I need to do that. If you noticed, I haven't updated the site in a while.
Thanks for reminding me Cindy.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greg, I have read your chapter on the new Printing API and it is very very good. I appreciate the link. I was hoping to ask a question about it though.
What I am wondering is if it is possible to print a web page from a JEditorPane with the new API or do you still have to use the java.awt.Printable interface to do that?
In reading the API and your book, it would appear that you can print a web page using a URL dataFlavor, however, I am not sure if that is just a way to get a file from a URL stream and print the file, or if it actually handles rendering and printing what appears after loading the url in a web browser or JEditorPane.
Thanks again.
 
Greg Travis
Author
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also use the new API to print objects that implement the java.awt.print.Printable interface. Check out the documentation for javax.print.DocFlavor.
 
    Bookmark Topic Watch Topic
  • New Topic