• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing a JTextPane

 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone point me to a code snippet which demonstrates how to print a JTextPane? Basically what I want to do is load an HTML page into a JTextPane and then print it off.
Thanks,
Frank
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surely someone has to know how to use the print API. Lots of you guys are certified too.
Frank
 
Janny Tima
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the Smart JPrint APIs that is available for free. In about a minue you should be able to print, preview, optionally PDF generate your Java programs and Swing component (JTextArea, JTextPane, JEditorPane, any JTextComponent , JTable) content and and J2EE program outout.

Lok at the online demo: http://www.activetree.com

About Smart JPrint?

Smart JPrint is a pure Java class library used for the following:
. Creates PDF documents from your J2EE and Java Swing GUI programs
. Prints the output to a printer </li>
. Allows your users to preview the output pages in a GUI window

Features

. 100% pure Java classes
. Generate PDF automatically (automatically breaks text lines, images, rows, columns into pages).
. Print the output to a printer.
. Preview output pages in a wanderful UI (this feature is normally used for Java Swing GUI applications).
. Only few lines of code to Print or generate PDF.
. Only 2 lines of code to generate PDF and Print swing components.
. Print and generate PDF from Swing components such as JTable, JTextArea, JTextPane, JEditorPane etc.
. Write J2EE program output as text, icons, 2D graphics to generate PDF automatically.
. Print and generate PDF for multiple Swing components next to each other.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic