CF9 - display .rtf file inline (conversion to something else okay)

Hello, everyone.
Just wondering if there is a way to display an .rtf file in a browser?  Every method I've tried, so far, just asks the user to download the .rtf file.
If I have to convert it to something else (like XML), first, I can do that.  The .rtf file does not reside in the filesystem, it's a binary in a BLOB in an Oracle database.
Thank you,
^_^

I'll look at the spec, thank you.
I Googled:
ColdFusion "convert rtf to xml"
"convert rtf to xml"
ColdFusion "display rtf inline"
... and a few others that I'm not recalling, right now.  Most of the links I found (99%) were for "FREE SOFTWARE DOWNLOAD", which I can't go anywhere near.
One of the links was to a forum where someone mentioned what I posted, earlier, about converting to XML, then using some built-in CF XML tag to parse.  Can't find it, now, though.
^_^

Similar Messages

  • How to display RTF file and .doc file in JTextPane

    How to display RTF file and .doc file in JTextPane??

    Duplicate post
    http://forum.java.sun.com/thread.jsp?forum=57&thread=567029&tstart=0&trange=30

  • How to display RTF File in Browser Using Servlets/JSPs

    Hi All,
    I have some RTF Files, which contains some data.
    The data needs to be displayed in the frame of jsp page .
    How i can display the RTF File Content using either servlets/jsps
    Can any body have idea on this.
    Help me out on this.
    With Regards
    Hari

    If you only need to display it, consider your HttpServletRequest just as byte stream. :) Just read from ServletInputStream and write it back into ServletOutputStream of HttpServletResponse.
    If you want to process incoming XML, please give some details first, what exactly you want to do. :)

  • How do I Convert PDF file in browser to something else?

    Hi All
      How can I convert a PDF file coming up in browser to something else so I can print it on my epson printer. I looked in other forums and found something I tried, where you downloaded a converter, and I converted in to Jpeg among some other options it had, and printer would still not work, printer works on regular websites or on my notepad etc. but won't do the PDF file or would not print once I converted it to other things, can anyone help me. Thank you

    I don't understand why you cannot print that PDF document.
    What happens when you click on the Print icon on the upper-left side of the Adobe Reader browser plugin

  • FF4 needs to display PDF files inline on the Mac, like Safari.

    Without support for viewing / controlling PDF files within Firefox 4.0 on the Mac, I simply can't use it. This disappoints me, the people at Firefox should have made this an absolute requirement before launch. The really infuriating thing is, I really like the changes in Firefox 4 and want to use it. For future reference here is a short list if absolute MUST HAVES ... JavaScript, Java, Flash, PDF.

    But it should be offering your the option to use the plug-in for free if for private or educational use. There should be a box or something in the dialog window to tick to state that education/private is your intended use. (It has been many years since seeing that dialog window, so I forget exactly how it looks.) After answering that question, from that point onward it should not bother you about registration anymore.
    You are a true genius.
    I have told my Papá that for many years and he just smiles at me and shakes his head a bit!
    Thank You for extending the courtesy of awarding points to comments that are helpful or provide answers in the Apple Support Communities, as this is not mandatory, but it is much appreciated!

  • I have beeb trying to download and install firefox for my new MAC and have not been able to. It seems to download and won't install when I drag it to the application file. Nothing appears in the file. Is there something else I need to do?

    I have downloaded firefox for my MAC OS X Lion, just purchased in December, and have done so several times but when I try to install it per the directions, nothing happens. The file that shows up says Alias in my applications and your instructions to Eject Firefox from the menu are not clear to me. Firefox does show up in the "Window" box but that's the only place it says firefox. Whenever I click on the folder, it seems to be emily. This installation process just doesn't seem to be working or either I'm not understanding it.

    You can try using this tool to first remove all traces of Reader from your computer:
    http://labs.adobe.com/downloads/acrobatcleaner.html
    Then, you can download the full offline Reader installer from
    http://get.adobe.com/reader/enterprise/
    After downloading, restart your computer and run the installer before doing anything else.

  • Problem displaying Word 2002 RTF files in JEditorPane

    Hi all,
    I am having a problem displaying RTF files created in Word 2002/Office XP in a JEditorPane.
    Our code, which does the usual stuff:
    JEditorPane uiViewNarrativeEda = new JEditorPane();
    uiViewNarrativeEda.setContentType(new RTFEditorKit().getContentType());
    FileInputStream inDocument = new FileInputStream("c:/temp/testing.rtf"); uiViewNarrativeEda.read(inDocument, "");
    inDocument.close();
    works just FINE with RTF files created in Word 97, WordPad etc, but it seems that Word 2002 adds some tags to the RTF file that the RTFReader cannot handle.
    For example, I believe the following exception is due to the new \stylesheet section that Word 2002 adds to the RTF file:
    java.lang.NullPointerException:
         at javax.swing.text.rtf.RTFReader$StylesheetDestination$StyleDefiningDestination.close(RTFReader.java:924)
         at javax.swing.text.rtf.RTFReader.setRTFDestination(RTFReader.java:254)
         at javax.swing.text.rtf.RTFReader.handleKeyword(RTFReader.java:484)
         at javax.swing.text.rtf.RTFParser.write(RTFParser.java, Compiled Code)
         at javax.swing.text.rtf.AbstractFilter.readFromReader(AbstractFilter.java:111)
         at javax.swing.text.rtf.RTFEditorKit.read(RTFEditorKit.java:129)
         at javax.swing.text.JTextComponent.read(JTextComponent.java:1326)
         at javax.swing.JEditorPane.read(JEditorPane.java:387)
    Does anyone have similar problems or knows how I could get around this?
    I thought about writing a parser that replaces the \stylesheet section with one that works but that seems a lot of work and it does not always work (I tried that by copying and pasting...).
    Maybe I could replace the RTF converter that Word 2002 is using with another one - but how?

    Hello again,
    I found out that the 2002 version of MS Word writes a lot more of data into the file than e.g. Wordpad does.
    There is one section that causes the problem, its called "\stylesheet".
    My workaround (working in my case) is to wrap the input stream of the RTF document and remove this section (only in memory).
    See example implementation:
    <<<<<<<<<<<<<<<<<<<<<<< SOURCE CODE<<<<<<<<<<<<<
    * Copyright 2004 DaimlerChrysler TSS.
    * All Rights Reserved.
    * Last Change $Author: wiedenmann $
    * At $Date: 2004/03/31 11:08:54CEST $.
    package com.dcx.tss.swing;
    import java.io.*;
    * This class provides a workaround for parse errors in the
    * {@link javax.swing.text.rtf.RTFEditorKit}. These errors are caused
    * by new format specification for RichTextFormat (RTF V1.7).<br>
    * <br>
    * The workaround is to filter out a section of the RFT document
    * which causes an exception during parsing it. This section has no
    * impact on the display of the document, it just contains some
    * meta information used by MS Word 2002.<br>
    * The whole document will be loaded into memory and then the section
    * will be deleted in memory, there is no affect to the document
    * directly (on file system).<br>
    * <br>
    * <i>This workaround is provided without any warranty of completely solving
    * the problem.</i>
    * @version $Revision: 1.1 $
    * @author Wiedenmann
    public class RtfInputStream extends FilterReader {
    /** Search string for start of the section. */
    private static final String SEC_START = "{\\stylesheet";
    /** Search string for end of the section. */
    private static final String SEC_END = "}}";
    /** Locale store for the document data. */
    private final StringBuffer strBuf = new StringBuffer();
    * Wrapper for the input stream used by the RTF parser.<br>
    * Here the complete document will be loaded into a string buffer
    * and the section causes the problems will be deleted.<br>
    * <br>
    * @param in Stream reader for the document (e.g. {@link FileReader}).
    * @throws IOException in case of I/O errors during document loading.
    public RtfInputStream( final Reader in ) throws IOException {
    super( in );
    int numchars;
    final char[] tmpbuf = new char[2048];
    // read the whole document into StringBuffer
    do {
    numchars = in.read( tmpbuf, 0, tmpbuf.length );
    if ( numchars != -1 ) {
    strBuf.append( tmpbuf, 0, numchars );
    } while ( numchars != -1 );
    // finally delete the problem making section
    deleteStylesheet();
    * Deletion of the prblematic section.
    private void deleteStylesheet() {
    // find start of the section
    final int start = strBuf.indexOf( SEC_START );
    if ( start == -1 ) {
    // section not contained, so just return ...
    return;
    // find end of section
    final int end = strBuf.indexOf( SEC_END, start );
    // delete section
    strBuf.delete( start, end + 2 );
    * Read characters into a portion of an array.<br>
    * The data given back will be provided from local StringBuffer
    * which contains the whole document.
    * @param buf Destination buffer.
    * @param off Offset at which to start storing characters -
    * <srong>NOT RECOGNIZED HERE.</strong>.
    * @param len Maximum number of characters to read.
    * @return The number of characters read, or -1 if the end of the
    * stream has been reached
    * @exception IOException If an I/O error occurs
    public int read( final char[] buf, final int off, final int len ) throws IOException {
    if ( strBuf.length() == 0 ) {
    // if buffer is empty end of document is reached
    return -1;
    // fill destination array
    int byteCount = 0;
    for (; byteCount < len; byteCount++) {
    if ( byteCount == strBuf.length() ) {
    // end reached, stop filling
    break;
    // copy data to destination array
    buf[byteCount] = strBuf.charAt( byteCount );
    // delete to copied data from local store
    strBuf.delete( 0, byteCount + 1 );
    return byteCount;
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Integration of the warpper looks like:
    RtfInputStream inDocument = new RtfInputStream( new FileReader("test.rtf"));
    Document doc = rtf.createDefaultDocument();
    rtf.read(inDocument, doc, 0 );
    Hope this helps - for me it did :-)
    Timo Wiedenmann
    DaimlerChrysler TSS, Germany

  • RichTextBox Binding to a String or something else

    Hello.
    First, I'am from Germany and I have to learn english and this is the reason, why I wrote my question in english.
    My problem is: I want to bind a RTF to a String or something else, to work with the informations in behind code.
    But after I searched to get more informations about this, I got 2 codes which should help me to bind a FlowDocument to a RTf.
    /*This simply takes the string and reads it line by line. If we have the desired characters at the end of a line (“:.”),
    * then we make the line blue and bold and remove the characters, otherwise we just add the text.
    * Each line is added as a paragraph so to reduce the space between each one.
    http://www.codeproject.com/Articles/137209/Binding-and-styling-text-to-a-RichTextBox-in-WPF*/
    protected Object Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
    FlowDocument doc = new FlowDocument ();
    String s = value as String;
    if(s != null)
    using ( StringReader reader = new StringReader ( s ) )
    String newLine;
    while ( ( newLine = reader.ReadLine () ) != null )
    Paragraph paragraph = null;
    if ( newLine.EndsWith ( ":." ) == true )
    paragraph = new Paragraph ( new Run ( newLine.Replace ( ":.", string.Empty ) ) );
    paragraph.Foreground = new SolidColorBrush ( Colors.Blue );
    paragraph.FontWeight = FontWeights.Bold;
    else
    paragraph = new Paragraph ( new Run ( newLine ) );
    doc.Blocks.Add ( paragraph );
    return doc;
    public class BindableRichTextBox : RichTextBox
    public static readonly DependencyProperty DocumentProperty = DependencyProperty.Register ( "Document", typeof ( FlowDocument ), typeof ( BindableRichTextBox ), new FrameworkPropertyMetadata ( null, new PropertyChangedCallback ( OnDocumentChanged ) ) );
    public new FlowDocument Document
    get
    return (FlowDocument) this.GetValue ( DocumentProperty );
    set
    this.SetValue ( DocumentProperty, value );
    public static void OnDocumentChanged ( DependencyObject obj, DependencyPropertyChangedEventArgs args )
    RichTextBox rtb = (RichTextBox) obj;
    rtb.Document = (FlowDocument) args.NewValue;
    But know I have no idea, how to work with this code. 
    Can maybe anyone help me?
    Tom

    I don't see any binding in that code you posted there.
    You can bind the content of a run.
    <Run Text="{Binding someProperty}"
    And you can create a binding like that in code.
    https://msdn.microsoft.com/en-us/library/ms742863%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396
    I'm not sure what you have as a viewmodel or whatever to bind to that but you can also manipulate xml into xaml which would be one way to build a document had many runs, paragraphs and bindings.
    The dynamic xaml series of articles linked in my sig does that kind of manipulation to generate UI from xml templates. You could use a similar technique - none of those articles do exactly what you're after I'm afraid.
    Hope that helps.
    Recent Technet articles:
    Property List Editing;  
    Dynamic XAML

  • Images in RTF file do not display in WordPad

    I inserted some images into a flowdocument, then save it as a rtf file.
                Image photo = new Image();
                BitmapImage photoFile = new BitmapImage();
                photoFile.BeginInit();
                photoFile.UriSource = new Uri("image.bmp", UriKind.Relative);
                photoFile.EndInit();
                photo.Source =photoFile;      
                Paragraph pPhoto = new Paragraph();
                pPhoto.Inlines.Add(photo);
                flowdoc.Blocks.Add(pPhoto);
    When I open the rtf file with wordpad, all the images are lost. But they can be displayed in Word.
    Why does that happen?
    Thx.

    WordPad (at least version 6.1 on W7) cannot display linked images, MSWord can. WordPad
    can display embedded images. But the format seems to be some uncompressed WindowsMetaFile8 format, which may increase the storage footprint, compared to eg. PNG graphics, drastically. (Open a Wordpad RTF in Notepad, you'll see...)
    A cross-check against the DotNET 1.1 RTF control shows the same as in Wordpad, linked images do not show up. That leads to the assumption that Windows Forms as well as Wordpad are based on the Windows Common RTF Control, and that control seems
    not to support linked images.
    I'm not quite sure yet, but WPF converts RTF content to XAML (which is very similar to HTML), so it does not rely on the Windows RTF common control, thus linked images in RTF are not a problem there.
    HTH
    Ulrich

  • View the .rtf file not display the data in BI Publisher Enterprise.

    Hi,
    Platform: OBIEE 10g in NT XPsp2
    View the .rtf file not display the data in BI Publisher Enterprise.
    Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
    Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
    Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
    It is showing only the .rtf file without data. Why there is no data?
    Please guide me to solve this issue.
    Thanks,
    Jo

    Thanks for you reply,
    Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
    We dint face this kind of issue while developing other reports.
    So please let us know if you have any idea on why we are facing this issue.
    Regards,
    Maneesh

  • How to display data from *.rtf file with apex in user-frienldy format?

    Hello!
    Well, in my database I have column "Problem" which type is CLOB, and there is text from some *.rtf file, e.g.
    "{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset238{\*\fname Arial;}Arial CE;}{\f1\fmodern\fcharset238{\*\fname Courier New;}Courier New CE;}{\f2\fnil Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green0\blue68;} \viewkind4\uc1\pard\cf1\lang1045\f0\fs20 Dla podanego poni\'bfej dokumentu XML zdefiniuj schematy XML (pliki XML-Schema), kt\'f3re pozwoli\'b3yby na jego walidacj\'ea. Przy definicji ka\'bfdego ze schemat\'f3w okre\'9cl jego nazw\'ea. \par \par \pard\cf2\b\f1 <?xml version="1.0" encoding="UTF-8"?> \par <s3:A1 xmlns:s1="udasie" xmlns:s2="czy" xmlns:s3="nie" \par xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \par xsi:schemaLocation="nie schemat3.xsd czy schemat2.xsd" \par C3="u"> \par \lang1033 <C3>d</C3> \par <B2>a</B2> \par <s1:A1 s1:A1="s"> \par \lang1045 <s1:B2>i</s1:B2> \par <s1:C3>e</s1:C3> \par <s2:B2> \par <A1>na pewno</A1> \par </s2:B2> \par </s1:A1> \par </s3:A1>\fs28 \par \pard\cf1\b0\f2\fs20 \par } ?
    And the problem is:
    in my APEX appliactions I only want to display this *.rtf text in user-friendly format (http://cerber.cs.put.poznan.pl/~inf71287/screen.png).
    Is there any simple way to do this?
    This is how it looks now: http://cerber.cs.put.poznan.pl/~inf71287/not_good.png - unreadable ;-)
    Thanks for any suggestions :)
    Buczuss
    Message was edited by:
    Buczuss

    A new preference has been added to customize the import delimiter in main code line. This should be available as part of future release.

  • Display a static file inline

    hi all
    I am wondering, is there any way to display a pdf file inline in my page. I have uploaded a manual(pdf file) in the shared components and i want to display it in one of the page as inline document.Can we accomplish this or is there any other alternative.
    thanks
    Kumar

    That destroy() method is refered to the present Xlet to destroy it?
    Think that if you destroy the first Xlet, you won't be able to execute the code after that instruction. And to execute the destroy method you must reach it through the notifyDestroy method of the XletContext.

  • 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.

  • Display a file with in the ADF screen in the edit mode.(RTF or Word format)

    Hi ,
    As per my business need i need to display a file (.doc or .pdf) in the ADF screen in the edit mode. Later user can be able to save the document . As of now i am using a separate editor for edit the document. but that editor is supporting only for html format only. so that some images which are there in those files are not displaying in the screen.so this is not the consistent solution for my requirement.
    So please help on this if any body had done this kind of object.
    Thanks,
    Rajesh
    Edited by: 927500 on Apr 18, 2012 7:31 AM

    Hi,
    ADF doesn't provide a component for PDF and Word editing.
    Frank

  • How to display 'page border' in PDF output file - RTF file contains border

    I have a simple RTF file which has 2 fields
    The RTF file has image and page border. When I preview as a PDF file (through BI publisher desktop), I can see image and fields merged properly. But I don't see the page border
    Does anybody know why it's not disaplying page border?
    Any help is much appriciated
    Thanks,
    Kavitha

    Hi,
    Apparently, it's a bug based on the following thread. Workaround would be to use table as border.
    Re: Pls Help.
    regards,
    Rownald

Maybe you are looking for

  • Group tree display

    I am looking for a way to filter what is displaying in my group tree. I have a report that displays three groups. I have been able to filter the report to only show the data in the report that I want it to display but my group tree still shows data.

  • [solved] To display Processes which are not running from constant process

    i have constant processes prostat1,prostat2,prostat3,prosta4,prostat6,prostat8,prostat9 (6 processes) runs to support the application Now my problem is i want to display the process which is not running (from the above 6 processes) Thanks in advance

  • Trouble with Installer

    So I have had my Macbook Pro for a few years now, and now I can't download anything. I have plenty of room on my hard drive, but every time I use the installer (for flash, growl, really anything!) it tells me: "You need about 13.1MB more free space o

  • H:commandButton and attribute image

    I cannot make work a h:commandButton that contains an image.When the browser opens a see "a not found image" icon. The code is <h:commandButton image="/images/englishFlag.jpg"                     actionListener="#{rushmore.listen}"                   

  • Looking for documnet to CDS Internet streamer software upgrade from 2.5.9 to 3.1 procdure

    I WANT THE  DETAILED PROCEDURE DOUCMENT TO DO THE SOFTWARE UPGRADE OF CONTENT DELIVERY SERVICE iNTERNET STREAMER FROM 2.5.9 TO 3.1 IMAGE