Inconsistent Behavior When Displaying Word Document

I use the following code to display an OrdDoc object on a web page using a servlet. When the object is a Word document and it is being displayed for the first time, the Word application handles the document. The second time it is displayed, the IE browser plug-in handles the document. Can you tell me why this is so? How can I get the Word document to just display in the IE browser everytime? Image objects are consistently displayed in the browser. Thank you.
OrdDoc ordDoc = (OrdDoc)rset.getORAData(1,(ORADataFactory)OrdDoc.getORADataFactory());
OrdHttpResponseHandler handler = new OrdHttpResponseHandler(actionRequest.getHttpRequest(),actionRequest.getHttpResponse());
               handler.sendDoc(ordDoc);

The ORDDoc type will not be able to recognized the WORD document and set the mimetype attribute correctly. Thus when you populate the object you should set the mimetype attribute yourself using the setMimeType() method of ORDDoc.
When the object is fetched and sent on by the HttpResponseHandler, the handler will use the mimetype setting to set that field in the Response header. This should help browsers to handle the content correctly.

Similar Messages

  • Displaying Word documents on web using IFS

    I am trying to display word documents stored in IFS on the web using the IFS Java API. The process we are currently using is outlined as follows :
    1. Connect to IFS using the connect() method of LibraryService class.
    2. Obtain references to IfsFileSystem object and PublicObject (using findPublicObjectbyPath() method of IfFileSystem class).
    3. Cast the PublicObject to Document class.
    4. Obtain a reference to the InputStream using the getContentStream() method of Document class.
    Now, how do we display the contents of this document on the web ? Is there any IFS classes that do this for us or do we have to rely on the Java I/O classes to read the InputStream char-by-char and display the file ?
    Thanks

    If you are trying to retrieve binary content through a customer Web client, you wouldn't write it to the browser - since the browser can only display HTML.
    Instead, you would generate a Web page which includes a URL to the document (e.g. http://ifsserver/:81466, or http://ifsserver/public/mydoc.doc). Subsequently, when a user clicks the URL, the browser will request the document directly from Oracle iFS' http server. When the http protocol server returns the document content, the browser will determine its MIME type, and launch the appropriate viewing application or helper application automatically.
    null

  • How to display word document as a HTML document in portal

    Hi
    I developed a portal application in that i am displaying word document using IFrames, from my application i am uploading word document and saving those document in KM
    Requirement is that i need to provide an option to show this word document in html.
    Thanks
    Rudradev.

    Hi Glenn Mendonca
    I thing it is possible
    Even in SDN search results page, we have option called "HTML version" link
    to see the search document in HTML
    see the below url
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2fforums%2fsdn_forums%2fthread%7b74687265616449443d39313633%7d.jspa
    i hope passing doucment as a query parameter to com.sap.km.cm.highlightedcontent?DocumentUri=
    might solve this
    pls give your inputs
    Thanks

  • Display Word Document as read only in VI pannel

    In a VI pannel I put an Active X container with the IE browser to display Word documents.
    The document are displayed properly but I want not give the user the possibility to make changes while viewing.
    Is there a solution to do so?
    (The documents are read-only and can not be saved.)

    Why use an IE container to display Word documents? You can place a word document directly in the ActiveX container. This seems a better choice.
    If you wish to totally block user-input, you can place a transparent picture control over the display of the Word document.
    Another alternative would be to convert the word document to a PDF and show this in an AcviteX container.
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

  • Poor graphics redraw when scrolling Word documents

    I have a strange blurring effect when scrolling Word documents on my Macbook pro, as if the graphic card had trouble refreshing: the screen is interspersed by horizontal irregular lines that make it impossible to read the text.
    I have recently replaced the logic board. Anyone has an idea of what this could be?
    Thank you for the help!

    I've only seen this in Word, and only in Page Layout view. It does not occur in Notebook view (although there are other stability issues with that view). At the moment I'm working on a 125 page document that I am writing, and scrolling through there are no problems.

  • Displaying Word Document from a Database

    Let me try to explain this.
    I can upload and store a Word Document in an Oracle database
    (BLOB column) but now I need to extract that Word document and
    place a pointer to it on the Web. Can someone explain to me how
    this is done?
    I'm trying to do something like have an image displayed on
    the Web and when you click on it the Word Document is opened.
    Follow me on that? So, if there are 15 Word documents in the
    database, then the web page would have 15 images all pointing to
    each separate Word document.
    Has anyone done this?

    Don't take my word on this, but I think this should work;
    I've done this in the past to send dynamically-generated CSV files
    to the user, which is in a way (at least at the perspective of
    what's being outputted to the user) the same thing.
    First, obviously, you need to retrieve the Word document data
    from the database. We'll say you put that in a variable called
    'wordDoc'.
    <cfset wordDoc = someQuery.wordDataObj />
    Next, we need to set the 'Content-disposition' HTTP header,
    to tell the client's browser that we're sending a file, and that we
    want you to call it somefile.doc by default. We'll do this with the
    <cfheader> tag (note that if you use <cfflush> in the
    application, this tag (and thus, this approach)
    will not work.
    <cfheader name="Content-disposition" value="attachment;
    filename=somefile.doc" />
    Almost there. Now we need to set the Content-type HTTP
    header, to tell the browser what kind of data is coming, and then
    give it the actual file data. We'll use the <cfcontent> tag
    to do both of these things.
    <cfcontent type="application/msword"
    reset="yes">#wordDoc#</cfcontent><cfabort>
    If memory serves, this should be all you need. Note the
    <cfabort> after the closing <cfcontent> tag, I've had
    problems in the past with additional output on the page after these
    tags being appended to what gets sent to the browser, so I use a
    <cfabort> afterwards to make sure nothing more gets sent
    after the data we want. Also, at least with CFMX7, I've noticed
    that debugging output tends to get added in too regardless, so I
    typically put a <cfsetting showdebugoutput="false" /> at the
    top of the file, too.
    I can't guarantee this will work, I haven't tested this
    particular situation, but if it doesn't, it ought to be close. Let
    me know if I'm wrong.
    Attached is what should be the code without my commentary /
    rambling interspersed.

  • Upload and display Word Document in WD application

    Hello,
    I have a WD ABAP appl. where the user wants to upload an Word / Excel file (from its own local drive).
    The document shall be saved in SAP and it shall also be possible to display the document later in the WD application.
    I implemented the UI element upload in the view, to determine the path of the document.
    For the display implemented the UI element Office control.
    1. When i browse the document, the properties data, filename and mime type are filled into the bound context elements of the upload UI.
    2. The property datasource of the UI office control I bound to the same context element, that is also bound to the property data of the upload UI.
    The office control opens a word document, but the document is empty.
    Is it possible that the document is not uploaded correct?
    In another application I did an upload for a PDF doc.. There I implemented the following coding as action of the button 'Upload'.
    data lo_nd_pdf type ref to if_wd_context_node.
    data lo_el_pdf type ref to if_wd_context_element.
    data ls_pdf type wd_this->element_pdf.
    data lv_pdf like ls_pdf-pdf.
    navigate from <CONTEXT> to <PDF> via lead selection
    lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    get element via lead selection
    lo_el_pdf = lo_nd_pdf->get_element( ).
    get single attribute
    lo_el_pdf->get_attribute(
    exporting
    name = `PDF`
    importing
    value = lv_pdf ).
    Get a reference to the from processing class.
    data: l_fp type ref to if_fp.
    l_fp = cl_fp=>get_reference( ).
    Get a reference to the PDF Object class.
    data: l_pdfobj type ref to if_fp_pdf_object.
    l_pdfobj = l_fp->create_pdf_object( ).
    set the pdf in the PDF Object
    l_pdfobj->set_document( pdfdata = lv_pdf ).
    set the PDF Object to extract data the Form data.
    l_pdfobj->set_extractdata( ).
    execute call to ADS
    l_pdfobj->execute( ).
    get the PDF Form data
    data: pdf_form_data type xstring.
    l_pdfobj->get_data(
    importing
    formdata = pdf_form_data ).
    convert the xstring from data to string so it can be processed using the iXML classes
    data: converter type ref to cl_abap_conv_in_ce,
    formxml type string.
    converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
    converter->read(
    importing
    data = formxml ).
    pull in the iXML type group.
    type-pools: ixml.
    get a reference to iXML object
    data:l_ixml type ref to if_ixml.
    l_ixml = cl_ixml=>create( ).
    get iStream object from StreamFactory
    data: streamfactory type ref to if_ixml_stream_factory,
    istream type ref to if_ixml_istream.
    streamfactory = l_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    create an XML document class that will be used to process the XML
    data: document type ref to if_ixml_document.
    document = l_ixml->create_document( ).
    create the parser class
    data: parser type ref to if_ixml_parser.
    parser = l_ixml->create_parser( stream_factory = streamfactory
    istream = istream
    document = document ).
    parse the XML
    parser->parse( ).
    define XML Node type object
    data: node type ref to if_ixml_node,
    attributes type ref to if_ixml_named_node_map.
    get the psi sales data Node and value.
    data ls_psi_sales type wd_this->element_psi_sales.
    data: lt_dfies type table of dfies,
    ls_defies type dfies.
    call function 'DDIF_NAMETAB_GET'
    exporting
    tabname = 'ZCM_PSI_SALES'
    ALL_TYPES = ' '
    LFIELDNAME = ' '
    GROUP_NAMES = ' '
    UCLEN =
    IMPORTING
    X030L_WA =
    DTELINFO_WA =
    TTYPINFO_WA =
    DDOBJTYPE =
    DFIES_WA =
    LINES_DESCR =
    tables
    X031L_TAB =
    dfies_tab = lt_dfies
    exceptions
    not_found = 1
    others = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    data: lv_fieldname type string.
    field-symbols <fs_field> type any.
    loop at lt_dfies into ls_defies.
    lv_fieldname = ls_defies-fieldname.
    node = document->find_from_name( name = lv_fieldname ).
    assign component lv_fieldname
    of structure ls_psi_sales
    to <fs_field>.
    if <fs_field> is assigned.
    <fs_field> = node->get_value( ).
    endif.
    endloop.
    WRITE DATA INTO CONTEXT
    data lo_nd_psi_sales type ref to if_wd_context_node.
    data lo_el_psi_sales type ref to if_wd_context_element.
    navigate from <CONTEXT> to <PSI_SALES> via lead selection
    lo_nd_psi_sales = wd_context->get_child_node( name = wd_this->wdctx_psi_sales ).
    get element via lead selection
    lo_el_psi_sales = lo_nd_psi_sales->get_element( ).
    set all declared attributes
    lo_el_psi_sales->set_static_attributes(
    exporting
    static_attributes = ls_psi_sales ).
    Do I need such a code also to upload a word doc?
    Which interface / class exists for word documents? (for PDF upload there is the interface IF_FP)
    How can I save a document in SAP? (as MIME Object?  with which method?)
    I hope someone can help me!?
    BR

    You can use the fileupload and filedownload uielements.
    Check these links:
    [File Upload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm]
    [File Download|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm]
    When you upload a file and save in SAP, are you saving it as xstring.
    If yes follow these steps for filedownload.
    Follow these steps for file download:
    1 Create FileDownload uielement in your View
    2.Create an Attribute of type xstring.
    3.Bind this attribute to the data property of your Filedownload uielement.
    4. during fileuplaod as you are saving the document in xstring format, fetch the same from your database table and pass the value to filedownload i.e set the attribute bound to data property of filedownload uielement with the xstring content.

  • Office Control does not display word document

    HI all,
    I followed the example code to display a word document in the office Control UI, but the display remains blank when I push the button to 'show document'.
    I do not have MS Office installed on the server so I have a wordpad named example.doc on the C drive. Can I read the data from wordpad and display it on the Office Control?
    Thanks
    Jay.

    > Thanks all,
    > I have Office 2003 installed on the client but not on
    > the server. The bytes[] array gets loaded with the
    > string '[B@10e770f', but the display stays empty.
    >
    > Jay
    Hi Jay,
    I need to use this feature as well. Did you get it to work. Can you display and edit a Microsoft Word document from within a browser page. It would be good to know that you have been successful.
    Jesse

  • Display word documents in portal content

    Hi,
    I have some word documents, which i want to display directly in the portal page. To display the documents I have generated a URL for each document and put this URL into an URL iView.
    But the problem now is, that it always opens a separate window for the word documents, although I have set the property "Open in portal content" in the iview and "Isolation Method - Embedded" in the portal page.
    Does somebody know, which additional settings are needed, to show the documents embedded in the portal page?
    Thanks in advance!
    Regards,
    Lydia

    Hi Lydia,
    The  "Isolation Method - Embedded" will NOT help at all in your case, the "Open in the portal content area" means that
    the iView itself will be opened in the portal content area, instead of a new windows.
    In your case, I agree with Raghu that you should use KM Document iView instead of URL iview, so please consider:
    1. createa separate KM document iViews for every DOC, make sure "Open in the portal content area" is set.
    2. craete a workset and assign the KM Document iViews to this workset
    3. assign this workset to a certain role and assign the role to your user.
    4. login with this user and try to launch the iview, then the DOC file should be opened in the same browser window
    Thanks and best regards,
    Thunder
    Edited by: Thunder Feng on Nov 19, 2010 2:07 AM

  • Display Word Document in ABAP WebDynpro

    Hi All,
    We have a number of word documents stored in the Business Document Navigator (Transaction OAOR) that we would like to display within a simple ABAP WebDynpro.  Demo program SAPRDEMO_FORM_INTERFACE shows how to retrieve a document from BDS via class cl_bds_document_set.  However, I am not seeing a similiar program for ABAP Web Dynpro.
    I was hoping that WebDynpro test application IOS_TEST_SIMPLE_MS would do the trick; however that appears to only work for a MIME repository object.  Is there a way to display these documents through ABAP WebDynpro?  Can anyone point me to a sample program?  Thanks.
    John

    Hi John
    Have a look at this thread [     Approach content repository other way then URL approach  |Re: Approach content repository other way then URL approach;.
    Thomas Jung delivers some (as always) excellent answers to a very similar problem. If the document is in DMS or BDS really doesn't matter so if I were you I would follow the "cached response" path.
    Also, do a google-search for --  abap "cached response" -- and you will find some additional links here (Thomas has even more to offer...).
    If you do follow this path please share some details as a follow up in this thread for the benefit of the community at large.
    Regards, Johan

  • Store and display word document in database through forms

    how can i store a word document in database through forms 6i or 10g, and display it through forms from database.
    i know how to store a binary file in database through DBMS_LOB package, but i want to do it throug forms. is it possible?
    regards

    Hi Alex
    "Create a datablock and specify the item datatype as blob"
    BUT: How to bring the document to the blob?
    Hi user 611..
    Warning: It is easy if you use an OLE-Object - but OLE is a special format. The result will not be the same as with dbms_LOB.
    We have a application with documents stored via OLE - terrible!
    OLE is no longer supported by forms 10. But webutil would help.
    I asked a similar question and got a good answer:
    OLE-Container and migration to the web
    Wolfram

  • Multiple Portal Authentication when closing Word document

    Hi all,
    We are on EP6 SP2 Patch4 HF7 and CM HF6.  When closing a MS Word document accessed from the KM Repository multiple Portal authentication popups appear.  This only happens to Word documents.  Other documents like Excel, Powerpoint, pdf etc. close without any popups.
    The problem only happens when going through the IISProxy filter.
    Does anybody have any ideas ?
    Thanks
    Jose

    > 1. Are you using NTLM authentication?
    > 2. What version of IIS?
    > 3. Can you show the IisProxy.xml file?
    > 4. Have you tried running an HTTP trace while that
    > happens to see what kind of requests & responses you
    > get?
    1. No
    2. IIS 5
    3. <?xml version="1.0" encoding="utf-8" ?>
    <!DOCTYPE ISAPI-config[
         <!ELEMENT ISAPI-config ( filter, extension, ( mapping | config )* )>
         <!ATTLIST ISAPI-config
              version CDATA #REQUIRED
         >
         <!ELEMENT filter (log-path?)>
         <!ATTLIST filter
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              priority ( high | medium | low ) "high"
              extension-url CDATA "/scripts/IisProxy.dll"
              authentication ( skip | normal | forward ) "normal"
              remote-address ( skip | forward ) "skip"
         >
         <!ELEMENT extension (
              keystore-dir?,
              log-path?,
              data-path?,
              trace-path? )>
         <!ATTLIST extension
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              access ( filter | direct | both ) "filter"
         >
         <!ELEMENT keystore-dir (#PCDATA)>
         <!ELEMENT log-path (#PCDATA)>
         <!ELEMENT data-path (#PCDATA)>
         <!ELEMENT trace-path (#PCDATA)>
         <!ELEMENT mapping (
              source+,
              target,
              compress-types*,
              protocol-header?,
              certificate-header?,
              cert-chain-header?,
              cipher-header?,
              keysize-header?,
              keystore-path?,
              log-path?,
              data-path? )>
         <!ATTLIST mapping
              name CDATA #IMPLIED
              log-level CDATA "1"
              log-flags CDATA "0"
              debug-flags CDATA "0"
              keep-alive ( true | false ) "true"
              use-continue ( true | false ) "true"
              close-socket ( true | false ) "true"
              close-socket-delay CDATA "1000"
              thread-count CDATA "100"
              max-socket-age CDATA "10"
         >
         <!ELEMENT source (protocol, host?, port?, prefix, new-prefix?)>
         <!ATTLIST source
              access ( filter | direct | both ) "filter"
         >
         <!ELEMENT protocol (#PCDATA)>
         <!ELEMENT host (#PCDATA)>
         <!ELEMENT port (#PCDATA)>
         <!ELEMENT prefix (#PCDATA)>
         <!ELEMENT new-prefix (#PCDATA)>
         <!ELEMENT target (protocol, host, port)>
         <!ELEMENT compress-types (#PCDATA)>
         <!ATTLIST compress-types
              min-size CDATA "1024"
         >
         <!ELEMENT protocol-header (#PCDATA)>
         <!ELEMENT certificate-header (#PCDATA)>
         <!ELEMENT cert-chain-header (#PCDATA)>
         <!ELEMENT cipher-header (#PCDATA)>
         <!ELEMENT keysize-header (#PCDATA)>
         <!ELEMENT keystore-path (#PCDATA)>
         <!ELEMENT config ( source+ )>
    ]>
    <ISAPI-config version="1.6">
         <filter name="IisProxy filter" authentication="forward" />
         <extension name="IisProxy extension" />
         <mapping name="IisProxy samples"
                        keep-alive="true" log-level="1" use-continue="false">
              <source>
                   <protocol>http</protocol>
                   <prefix>/irj/</prefix>
              </source>
              <source>
                   <protocol>http</protocol>
                   <prefix>/myserv.xxx.xx.xx/</prefix>
                            <new-prefix>/irj/</new-prefix>
              </source>
              <target>
                   <protocol>https</protocol>
                   <host>portalserv.xxx.xx.xx</host>
                   <port>#####</port>
              </target>
              <compress-types>text/html, text/plain</compress-types>
         </mapping>
         <mapping name="Secure IisProxy samples"
                      keep-alive="true" log-level="1" use-continue="false">
              <source>
                   <protocol>https</protocol>
                   <prefix>/irj/</prefix>
              </source>
              <source>
                   <protocol>https</protocol>
                   <prefix>/myserv.xxx.xx.xx/</prefix>
                            <new-prefix>/irj/</new-prefix>
              </source>
              <target>
                   <protocol>https</protocol>
                   <host>portalserv.xxx.xx.xx</host>
                   <port>#####</port>
              </target>
              <keystore-path>SAPSSLC.pse</keystore-path>
         </mapping>
         <config>
              <source>
                   <protocol>http</protocol>
                   <host>localhost</host>
                   <prefix>/IisProxy/</prefix>
              </source>
              <source>
                   <protocol>https</protocol>
                   <host>localhost</host>
                   <prefix>/IisProxy/</prefix>
              </source>
         </config>
    </ISAPI-config>
    4. I will try.
    Thanks,
    Jose

  • Error when importing Word document

    I am having a problem importing a Word document. This is the
    first time I have experienced the problem.
    Partway through the import (it appears to be attempting to
    open the Word document) I get a message:
    A file error has occurred.
    Try one or more of the following:
    *Check the disk drive to make sure the disk is properly
    inserted
    *Check the disk or the disk drive to make sure there is not a
    hardware problem
    *Check the network connections.
    Things I have tried:
    1. Reboot of the machine that has both RoboDemo (V5) and the
    Word document.
    2. Renaming the Word document to something with a shorter
    name.
    3. Taking out large sections of the document and then
    retrying. Repeat until the document is empty.
    I have searched this forum as well as the general web for any
    information. Help! I'm on a tight deadline and I just can't kill
    any more time screwing around with this.
    Thanks in advance,
    Sarah-Jane
    PS. I would be willing to send/attach the document if it
    would help someone.

    I started the import just before going to bed last night and
    it was still running when I killed it this morning. It did not
    error with the message you got but I did get a Microsoft Word
    message:
    The server application, source file, or item cannot be found.
    Make sure the application is properly installed.
    The import was stuck on the graphics under Metadata Format. I
    don't know if the callouts you had created in Word were the cause
    but you cannot have those in RoboHelp HTML which is going to give
    you a problem as the document is heavy on them.
    Back to the import. Is there something in your document that
    is pointing to a server? Is the template on a server or is your
    normal template on a server instead of being local?
    Also I notice you said RoboDemo. Did you mean that?

  • SharePoint prompting for password when saving word document

    Saving a word document back to SharePoint always prompts for credentials.
    I am the administrator for a SharePoint farm. We have enabled kerberos, and added the portal to the intranet zone in Internet Explorer by group policy. Most of the time this limits the amount of password prompts our customers see (including viewing the portal
    in a browser, and opening documents); however, we are still getting the prompt for credentials when trying to save a word document back to SharePoint.
    Here are some details: - SharePoint 2010 - Word 2010 - Kerberos enabled - Portal added to intranet zone in IE - Checkbox for passing automatic credentials enabled
    Can anyone help? Is there something I've missed? Is this prompt just unavoidable?

    Hi,
    Internet Explorer uses the Web Client service when you use Internet Explorer to access a
    WebDAV resource. The Web Client Service uses Windows HTTP Services (WinHTTP) to perform the network I/O to the remote host.  WinHTTP sends user credentials only in response to requests that occur on a local intranet site. 
    However, WinHTTP does not check the security zone
    settings in Internet Explorer to determine whether a Web site is in a zone that lets credentials be sent automatically.
    Click Start, type regedit in the Start Search box, and then press
    ENTER.
    Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
    On the Edit menu, point to New, and then click
    Multi-String Value.
    Type AuthForwardServerList, and then press ENTER.
    On the Edit menu, click Modify.
    In the Value data box, type the URL of the server that hosts the Web share, and then click
    OK.
    Note   You can also type a list of URLs in the
    Value data box. For more information, see the "Sample URL list" section in this article.
    Exit Registry Editor.
    After this registry entry is created, the WebClient service will read the entry value. If the client computer tries to access a URL that matches any of the expressions in the list,   the user credential will be sent successfully to authenticate
    the user, even if no proxy is configured.
    Note You have to  restart the WebClient service after you modify the registry.
    Reference: http://support.microsoft.com/kb/943280?wa=wsignin1.0
    -Ivan
    Ivan Sanders My LinkedIn Profile,
    My Blog,
    @iasanders.

  • Display Word-document in TextPane ?

    Is it possible to display a word-document in a JTextPane ?
    If yes,how can it be done ?
    thanx.

    You have to code a class that parses a Word doc file,
    and then returns the text and the attributes that the
    TextPane supports (which I think is only text).Hi,
    you can have all the styles in a JTextPane the Class StyleConstants supports if you use a DefaultStyledDocument it it and setup the styles in a SimpleAttributeSet with the methods of class StyleConstants. To insert styled text in the JTextPane use the insertString(...)-method of it - there you can pass string and SimpleAttributeSet.
    You can use this styles during editing too by the setParagraphAttributes(..)-methode resp. the setCharacterAttributes(...)-method.
    greetings Marsian

Maybe you are looking for