• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Printing a simple string or text area.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks for the help I will check them out.
    reply
      Bookmark Topic Watch Topic
    • New Topic