Reading rtf files

With my Macbook Pro I cannot read rtf files, neither with text edit nor open Office. How can I convert a rtf file into a pdf or doc file ? Is it the only way ?

Hi,
I don't know the origin. I suppose it was created on a PC with Word. But in fact this is a form which is filled. When I open the file (with text edit by default) I can see the form only without anything of the text filled. When I open with Open Office I can see the text but it is not located at the right place.
Excuse me if it is not well explained but I am French and don't probably use the right terms. Thank you in advance for your help.

Similar Messages

  • How To Read RTF file in JAVA?  Using  iText?

    How To Read RTF file in JAVA?  Using  iText?.....
    import java.io.*;
    import com.lowagie.text.*;
    import com.lowagie.text.rtf.*;
    public class RTF3 {
    public static void main(String[] args) {
    // System.out.println("This example generate a RTF file name Sample.rtf");
    // Create Document object
    Document myDoc = new Document();
    try {
    // Create writer to listen document object
    // and directs RTF Stream to the file Sample.rtf
    RtfWriter2.getInstance(myDoc, new FileOutputStream("Sample.rtf"));
    // open the document object
    myDoc.open();
    // Create a paragraph
         Paragraph p = new Paragraph();
         p.add("Helloworld in Rtf file..amazing isn't");
         // Add the paragraph to document object
    myDoc.add(p);
    catch(Exception e) {
    System.out.println(e);
    //close the document
    myDoc.close();
    Exception in thread "main" java.lang.NoSuchMethodError: com.lowagie.text.Rectangle.width()F
         at com.lowagie.text.rtf.document.RtfPageSetting.rectEquals(RtfPageSetting.java:433)
         at com.lowagie.text.rtf.document.RtfPageSetting.guessFormat(RtfPageSetting.java:362)
         at com.lowagie.text.rtf.document.RtfPageSetting.setPageSize(RtfPageSetting.java:341)
         at com.lowagie.text.rtf.RtfWriter2.setPageSize(RtfWriter2.java:248)
         at com.lowagie.text.Document.open(Unknown Source)
         at view.RTF3.main(RTF3.java:23)
    CAN you HELP me?

    import com.lowagie.text.Document;
    import com.lowagie.text.rtf.parser.RtfParser;
    import java.io.FileInputStream;
    String inputFile = "sample.rtf";
    Document document = new Document();
    document.open();
    RtfParser parser = new RtfParser(null);
    parser.convertRtfDocument(new FileInputStream(inputFile), document);

  • How do I read .rtf files on a Mac?

    I have a bunch of rtf files, but my Mac can't read them.  Is there a way to read them?

    In Mac OS X, RTF files can be opened with TextEdit.
    To open them, right-click one of these RTF files and choose Open with > TextEdit. They should open correctly

  • Reading RTF file content from JSP which stored in database as image format

    <%@page import="java.sql.*" %>
    <%@page import="java.net.*" %>
    <%@page import="java.io.*" %>
    <%@page import="java.*" %>
    <%@page import="javax.swing.*" %>
    <%@page import="javax.swing.text.*" %>
    <%@page import="javax.swing.text.rtf.*" %>
    <%
         Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection con=DriverManager.getConnection("jdbc:sqlserver://local:1433;databaseName=database;user=sa");
         Statement st=con.createStatement();
         ResultSet rs=st.executeQuery("select Document from docrev where UniqeId ='199207' ");//("select data from rtfdata");227317
         rs.next();
         byte bt[]=rs.getBytes(1);
         InputStream fi = new ByteArrayInputStream( bt );
         RTFEditorKit rtf = new RTFEditorKit();
         JEditorPane editor = new JEditorPane();
         editor.setEditorKit( rtf );
         rtf.read( fi, editor.getDocument(), 0 );
         Document d=editor.getDocument();
         String str=d.getText(0,d.getLength());
         /*OutputStream fo=new FileOutputStream("temp3.rtf");
         fo.write(str.getBytes());*/
    %>
    <html>
    <body>
    <p><textarea name=myarea style="background:#FFCC99" cols=100 rows=50><%=str%></textarea>
    </body>
    </html>
    Edited by: Santhu538 on Oct 23, 2007 10:16 PM
    Edited by: Santhu538 on Oct 23, 2007 10:25 PM
    Edited by: Santhu538 on Oct 23, 2007 10:26 PM

    Please use code tags while posting code. See the code button above the text area?
    It's a good practise not to mix jdbc code in your jsp (mvc and all that you see)
    Finally you'll have to quickly decide on your front end - jsp or swing. It looks like the former, but then with the code you have posted, the server is apt to pop up some windows prompting the user who has logged on (to the server) to choose the files for the client :)
    ram.

  • How to read rtf files

    hi
    i have an rtf or doc file. some text in thisfile is italic,bold,underlined etc. i want to read this from a java prog and find out what text is bold,underlined or formatted in other way.
    how can i do this. please help with prob.
    thanks

    someone please help

  • Pages (v. 5.01) can no longer read .rtf files... Ughhhh!

    Oh Apple. Please, please, please (I'm in a cold sweat), bring back import and export capabilities to Pages, like we had in Page '09.

    We are all just end-users like yourself here. To have Apple "hear" you you need to leave feedback for the Pages team using the link in the Pages menu and review & rate the new versions in the Mac App Store.

  • Printing RTF files from Java

    Hello,
    I need to print RTF files from a java program. I am reading RTF files in my program and after modification need to send them to a network printer for printing.
    Please let me know if there are any tutorials/books available on this.
    Thank you very much,
    Regards,
    Vaishali

    check these urls. may help u some extent.
    http://java.sun.com/docs/books/tutorial/2d/printing/index.html
    http://www.javaworld.com/javaworld/jw-03-2001/jw-0302-print.html
    http://java.sun.com/products/java-media/2D/forDevelopers/sdk12print.html

  • Reading an RTF file in Java

    Hi,
    Can someone tell me how can we read the data from an .rtf files like we do with text files in Java.
    I have seen solutions using Swing rtfeditor etc.. But I just need to read the data, I do not want to open rtf page.
    Any help would be appreciated.
    KK

    If you are not to "read" but to obtain bytes then you can modify this:
    //try{
      InputStream stream = new FileInputStream("cc.rtf");//file name is arbitrary
                                                                             //or BufferedInputStream can be used
       int n=0;
    while((n=stream.read())!=-1){
                System.out.print(Integer.toString(n));
                System.out.print(" ");
        System.out.println();
       if(stream!=null) stream.close();
    //   catch(IOException ioe){
    //       throw ioe;
    //  }

  • Why doesn't read the RTF file?

    Hello,
    Could anyone tell me what is the problem with the following code. It would
    read an 'rtf' file but it doesn't.
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.rtf.*;
    import java.io.*;
    import java.awt.event.*;
    public class Rtf extends JFrame {
    String filein = System.getProperty("user.dir")
    + System.getProperty("file.separator")
    + "BG.rtf";
    public Rtf() {
         RTFEditorKit rtfKit = new RTFEditorKit();
         DefaultStyledDocument doc = new DefaultStyledDocument();
         try {
              rtfKit.read( new FileInputStream( filein ), doc, 0 );
         } catch(Exception e) {
              System.out.println("Read error: " + e);
         System.out.println("doc.getLength: " + doc.getLength());
    public static void main(String[] args) {
    JFrame frame = new Rtf();
    During the execution the following lines are the result:
    Read error: java.lang.NullPointerException
    doc.getLength: 0
    Press any key to continue...
    Thank you in advance.

    If your rtf is made in word 2000 or newer version, rtf kit cannot read it and return null pointer statement

  • Reading the contents of RTF file

    Hi,
    I would like to read the contents of an RTF file which contains static text and place holders. The place holders have to be mapped to a database column(s) and once it is done I have to rewrite the output again to an RTF file. Is there any Java API directly available for this?

    Hey! Did you ever find a decent solution to this. I'm trying to do something similar.
    Read in an RTF file with some of the document already there, and embeded tags.
    These tags will be replaced with more RTF (which I would like to generate).
    Any pointers appreciated
    Regards
    Scott

  • Read external RTF file...

    Is it possible to read in the contents of an RTF file and
    assign those contents to a variable like we can do with a standard
    text file using ReadExtFile?
    I'm working on a peice that will (hopefully) read in the
    contents of an RTF file and adjust certain bits of the text
    depending on other variables...

    I agree and this is almost always the way I implement
    external text that
    needs almost any sort of formatting.
    With comments and tags, I can easily read in an HTML doc,
    find and make
    changes to blocks of text, and re-write the document back out
    as needed.
    I use the IE ActiveX control to show the file, though Apurva
    had a
    well-regarded alternative solution at some point.
    You could also 'walk the DOM' to effect changes to the HTML
    page via IE
    and CallSprite functions but that's a bit more complex.
    Erik
    Steve Howard **Community Expert** - eLearning + Mobile and
    Devices wrote:
    > If you can change the file format to HTML then I think
    you can do what
    > you want and run into many fewer issues. Plus HTM tags
    are easier to
    > read and write.
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - eLearning
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    Authorware Tips!

  • How to display a RTF file in the browser?

    Hi there,
    sorry 'bout my bad English.
    My jsp page have to get a rtf file and show it. Just setting the ContentPage to text/rtf, is it a solution?
    If not just that, what code I have to write? Let me know!
    Thanks

    I'm not sure if this can be done through JSP. You may need to write a servlet and set the mime type of the response to application/rtf. Then output the rtf text to the browser. Please let me know if you get this to work - I'm having a similar problem. Thanks.

  • Getting while attaching .rtf file in data template

    Hi All,
    When i am attaching a .RTF file to a data template , i am getting the following erro :
    The referring page may have come from a previous session. Please select Close Window to proceed
    i tried by login again but same error coming every time, please help me on thsi.
    Thanks

    <?xml version = "1.0" encoding="UTF-8" ?>
    <dataTemplate name="XMLTEST" description = "testing the" Version = "1.0">
    <properties>
    <property name="xml_tag_case" value="upper" />
    <property name="include_parameters" value="true"/>
    <property name="include_null_Element" value="true"/>
    </properties>
    <parameters>
    <parameter name="P1" dataType = "CHARACTER"></parameter>
    </parameters>
    <dataQuery>
    <sqlStatement name="Q1">
    <![CDATA[
    SELECT CASH_RECEIPT_ID , AMOUNT , SET_OF_BOOKS_ID
    FROM AR_CASH_RECEIPTS_ALL
    WHERE STATUS = :P1
    ]]>
    </sqlStatement>
    </dataQuery>
    <datastructure>
    <group name = "G1" SOURCE = "Q1" groupFilter="">
    <element name="CASH_RECEIPT" value ="CASH_RECEIPT"/>
    <element name="AMOUNT" value="AMOUNT"/>
    <element name="SET_OF_BOOKS_ID" value="SET_OF_BOOKS_ID"/>
    </group>
    </datastructure>
    </dataTemplate>
    i have modified the date datatype. im still seeing the same output. how do i change the element to be derived value? can you help me with the syntax.
    Thanks!

  • Could not overwrite rtf file on report template in BI Publisher

    Hi All,
    I want to upload the rtf file for Bi publisher report. There is already an rtf file and I have edited the file and want to overwrite it . It shows that the only way is to delete the template and again
    create the template by uploading the rtf file. I tried to overwrite the existing template with edited rtf but it shows the error. Is there any other options rather than deleting the template and uploading again for edited rtf file.
    Thanks,
    Virat

    Hi,
    it seems, sometimes everyone would like to draw a vertical reference line at the data date of a line chart, so I would like to bring this thread up again.
    I assume, that there is no vertical reference line on line, bar or area charts, because of the following reason: The vertical reference line is made for X1Axis; that's why it's called X1ReferenceLine. Line, bar and area charts don't have any X1Axis, but a O1Axis (ordinal axis):
    from Graph.dtd: "
    <!-- Ordinal axis on bar, line, area graphs-->
    <!ELEMENT O1Axis EMPTY >
    <!-- Horizontal data axis on bubble and scatter graphs; center point in
         polar graph-->
    <!ELEMENT X1Axis (ViewFormat?) >
    There is no such thing as <!ELEMENT O1ReferenceLine EMPTY > in Graph.dtd.
    Is there any other solution, why it seems not to be possible, to draw a vertical reference line on line charts?
    Kind regards,
    Tobias
    ps: Regarding the difference between X-Axis and ordinal axis, I take the explanation from http://goorman.free.fr/ZedGraph/zedgraph.org/wiki/index1240.html?title=What_does_%27Ordinal%27_mean%3F .

  • Show rtf file with header and footer  in Editor

    hi
    I want to open an rtf file which contains header and footer.The file i got is opened but the header and footer are not there.these all done with Editor.Please kindly go thru this and give me a solution.

    Hello,
    when you do yourEditorPane.getStyledDocument().dump(System.out), if you don't see and footer or header, you must write your own RTFEditorKit, but you must know how an RTF file is coded (but i don't know this coding...)

Maybe you are looking for

  • Optical drive, camera and bluetooth problems with Acer Aspire 7520

    Hello everyone First, my DVD drive just stopped working, it's not being recognized by Arch it seems. This has happened before a few times, but it suddenly started to work. I can open the tray manually, and when I insert a DVD, you can see the led bli

  • Socket time out exception in Reciver Soap Adapter

    Dear friends,   I have one errror in Soap Reciever adapter as follows: "java.net.SocketTimeoutException: Read timed out" Scenario: From Portal the data is posted to siebel system Portal - > PI - > Siebel Adapter: Sender Soap Adapter & Receiver soap a

  • Balance Score card data show in aggregation

    Hi All, I am developing a score card where I am using a structure which is displaying data in query as follows: fiscal period   sales 007.2007          30 008.2007          40 But when I see the same data in score card  it is displaying the sum and t

  • Art work not saved when quitting itunes

    Hi there, Whenever I quit itunes, all of the album artwork I downloaded through "Get Album Artwork" is not saved, and disappears the next time I open itunes! What is going on? Is it to do with the file format? does mp4 not take art? help! Dai

  • How skip initial screen of sp01?

    Dear Experts ,       I am working on BDC call transaction .here i am using sp01 transaction code .here i am passing data from my selection screen to first screen of sp01 using BDCDATA ,and displaying all print jobs.Now what my requirement is ,skippin