Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6148

Re: Generate Word-readable documents with Java?

From Rhino <no.offline.contact.please@example.com>
Newsgroups comp.lang.java.programmer
Subject Re: Generate Word-readable documents with Java?
Date 2011-07-13 03:56 +0000
Organization Your Company
Message-ID <Xns9F20F38FD6313noofflinecontactplea@94.75.214.39> (permalink)
References <Xns9F20C122646D0tenblade@94.75.214.39> <RTF-20110713012911@ram.dialup.fu-berlin.de>

Show all headers | View raw


ram@zedat.fu-berlin.de (Stefan Ram) wrote in
news:RTF-20110713012911@ram.dialup.fu-berlin.de: 

> Ten Blade <ten.blade@tenblade.com> writes:
>>I'd like to generate a moderately complex document (text, graphics,
>>tables, bulleted lists) with Java code that can be read by Microsoft
>>Word users. It's not important to me whether these document is in the
>>traditional 'doc' format or something else like .xml.
> 
>   Untested:
> 
> public class Main
> { public static void main( final java.lang.String[] args )
>   throws java.lang.Throwable
>   { final java.io.File outFile = new java.io.File( "example.rtf" );
>     final java.io.PrintWriter out = 
>     new java.io.PrintWriter( new java.io.FileOutputStream( outFile ),
>     true ); out.println( "{\\rtf1{\\fonttbl{\\f0 Arial;}}\\f0
>     example\\par}" ); out.close(); }
> 

Good point; I could write RTF documents. Thanks!

-- 
Rhino

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Generate Word-readable documents with Java? Ten Blade <ten.blade@tenblade.com> - 2011-07-12 22:59 +0000
  Re: Generate Word-readable documents with Java? lewbloch <lewbloch@gmail.com> - 2011-07-12 16:12 -0700
    Re: Generate Word-readable documents with Java? Ten Blade <ten.blade@tenblade.com> - 2011-07-13 00:53 +0000
  Re: Generate Word-readable documents with Java? Rhino <no.offline.contact.please@example.com> - 2011-07-13 03:56 +0000

csiph-web