Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing a simple string or text area.  RSS feed

 
Chris Mundt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I need to be able to pass a simple string or contents of a text area to a printer. The string has the possibility of being longer than one page and this is giving me some problems.
Does anyone have an example on how to pass a string and have it print on the required number of pages. This will be on multiple platforms so I am asuming that I have to use a PrinterJob?
Thanks for the help,
Chris
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps something in one of these resources on Printing in Java will help you:
  • Chapter 22 - Printing of the book Swing by Matthew Robinson and Pavel Vorobiev is available for downloading as are two other sample chapters at http://www.manning.com/Robinson/.
  • From the horse's mouth - the Printing trail of Sun's Java Tutorial
  •  
    Dirk Schreckmann
    Sheriff
    Posts: 7023
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    ...and JavaWorld offers a five part series of articles on Printing in Java:
    http://www.javaworld.com/javaworld/jw-10-2000/jw-1020-print.html
    Good Luck.
     
    Dirk Schreckmann
    Sheriff
    Posts: 7023
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Oh, and one more thing, Chris...
    Welcome To JavaRanch!
     
    Chris Mundt
    Greenhorn
    Posts: 2
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thanks for the help I will check them out.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!