If you just want to simply dump the data currently in the JTextPane:

Create a Document normally, 
create a ContentByte, 
create a Graphics2D from the ContentByte
use JTextPane.paint(Graphics2D).

There is a Graphics2D example in the Tutorial.

FOR BRUNO OR PAULO:
This Question has come up several times lately, I 
use this feature often and I would be happy to
create a small example to add to the tutorial.

Let Me know, 

-Bill Ensley
Bear Printing

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of BALA
> SINGAM
> Sent: Monday, August 22, 2005 10:39 AM
> To: Mark Hall
> Cc: [email protected]
> Subject: Re: [iText-questions] Can iText used in word processor
> application? Pls help me!!
> 
> 
> HI ,
>  I reallt don't get what u mean. I'm new to java, can u guide me please.
> I have include partial of my source code here...pls let me know how to
> integrate the iText with my word processor.
> -----------------------------------------------------------
> public class imageTest extends JFrame implements Printable
> {
> 
>  ComponentOrientation BidiConvert;
>  
> 
>  protected JTextPane m_monitor;
>  protected StyleContext m_context;
>  protected DefaultStyledDocument m_doc;
>  protected RTFEditorKit m_kit;
>  protected JFileChooser m_chooser;
>  protected SimpleFilter m_rtfFilter;
>  protected JToolBar m_toolBar;
> 
> public imageTest() {
>    super("Testing Image insertation");
>    setSize(600, 400);
> 
>    m_monitor = new JTextPane();
>    
>    m_kit = new RTFEditorKit();
>    m_monitor.setEditorKit(m_kit);
>    m_context = new StyleContext();
>    m_doc = new DefaultStyledDocument(m_context);
>    m_monitor.setDocument(m_doc);
>    //testDialog=new TestDialog(this);
>    JScrollPane ps = new JScrollPane(m_monitor);
>    getContentPane().add(ps, BorderLayout.CENTER);
> 
> 
> ----------------------------------------------------
> 
> 
>  BALA SINGAM
> www.singam.net
> 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to