JTextPane and HTML rendering

HAi
I have a web page with JApplet in it.
I need to get a HTML page from server and display it. I wish to use either JEditorPane or JTextPane.
The applet gets the file line by line from the server. I need to append the line by line to the component.
(i need to do some mappings before displaying, thats why i need to get text in parts.)
I tried to append line by line to JTextPane. But Pane is treating as text file. The tags are not getting recognised. Instead whole of the file is being displayed along with tags.
Is there any way by which i can append the file line by line with the tags being interpreted as they should be.
Anticipating an early reply
With thanks and regards
Maruti

Hello,
You must initialize correctly your JTextPane like this:
javax.swing.text.html.HTMLEditorKit htmlEditorKit = new javax.swing.text.html.HTMLEditorKit();
javax.swing.text.html.HTMLDocument htmlDoc = (javax.swing.text.html.HTMLDocument)htmlEditorKit.createDefaultDocument();
setEditorKit(htmlEditorKit);
setDocument(htmlDoc);
setEditable(true);
setContentType("text/html");

Similar Messages

  • TableCellRenderer with JTextPane and HTML

    I'm writing a TableCellRenderer that will be rendering HTML content using a custom extension to the JTextPane class. Where I'm having trouble is in calculating the necessary height to set the table row based on the content of the cell (in this case HTML text in my JTextPane component). I know the width of the table cell and I can figure out the width of the content (taking into account the formatting because of the HTML content). This all works perfectly until the column width shrinks enough to cause the underlying view to word wrap.
    Here is the code snippet from my JTextPane to count the number of lines of text and calculate the width of the content
      public int getWidthOfContent() {
        getLineCount();
        return m_iWidthOfContent;
      public int getWidthOfContent(int p_iWidthOfArea) {
        getLineCount(p_iWidthOfArea);
        return m_iWidthOfContent;
      public int getLineCount(int iComponentWidth) {
        int iWidth = 0;
        int iBreakCount = 0;
        int iHardBreakCount = 0;
        int iTotalWidth = 0;
        int iTotalContentWidth = 0;
        int iMaxHeight = 0;
        Document doc = getDocument();
        ElementIterator it = new ElementIterator(doc.getDefaultRootElement());
        StyleSheet styleSheet = null;
        if(doc instanceof HTMLDocument) {
          styleSheet = ((HTMLDocument)doc).getStyleSheet();
        if(iComponentWidth == -1) {
          iWidth = getWidth();
        else {
          iWidth = iComponentWidth;
        Element e;
        while ((e=it.next()) != null) {
          AttributeSet attributes = e.getAttributes();
          Enumeration enumeration = attributes.getAttributeNames();
          boolean bBreakDetected = false;
          while(enumeration.hasMoreElements()) {
            Object objName = enumeration.nextElement();
            Object objAttr = attributes.getAttribute(objName);
            if(objAttr instanceof HTML.Tag) {
              HTML.Tag tag = (HTML.Tag)objAttr;
    //          if(tag == HTML.Tag.BODY) {
    //            UCSParagraphView pv = new UCSParagraphView(e);
    //            if(pv.willWidthBreakView(iWidth)) {
    //              iHardBreakCount++;
              FontMetrics fontMetrics = null;
              if(styleSheet != null && styleSheet.getFont(attributes) != null) {
                fontMetrics = getFontMetrics(styleSheet.getFont(attributes));
              if(fontMetrics != null && fontMetrics.getHeight() > iMaxHeight) {
                iMaxHeight = fontMetrics.getHeight();
              if(tag.breaksFlow()) {
                //This must be a breaking tag....this will add another line to the count
                bBreakDetected = true;
                if(tag.equals(HTML.Tag.BR) || tag.isBlock() && (!tag.equals(HTML.Tag.HEAD) && !tag.equals(HTML.Tag.BODY))) {
                  if(iTotalContentWidth == 0) {
                    iTotalContentWidth = iTotalWidth;
                    iTotalWidth = 0;
                  else if(iTotalWidth > iTotalContentWidth) {
                    iTotalContentWidth = iTotalWidth;
                    iTotalWidth = 0;
                  else {
                    iTotalWidth = 0;
                  if(tag.equals(HTML.Tag.H1) || tag.equals(HTML.Tag.H2) || tag.equals(HTML.Tag.H3) || tag.equals(HTML.Tag.H4)) {
                    iHardBreakCount += 3; //These count as three lines (Blank - Content - Blank)
                  else {
                    iHardBreakCount++;
                iBreakCount++;
          if(!bBreakDetected) {
            Font font;
            FontMetrics fontMetrics;
            if(e.getDocument() instanceof HTMLDocument) {
              font = ((HTMLDocument)e.getDocument()).getStyleSheet().getFont(e.getAttributes());
              fontMetrics = getFontMetrics(font);
            else {
              font = getFont();
              fontMetrics = getFontMetrics(font);
            int iRangeStart = e.getStartOffset();
            int iRangeEnd = e.getEndOffset();
            if(fontMetrics.getHeight() > iMaxHeight) {
              iMaxHeight = fontMetrics.getHeight();
            if(e.isLeaf()) {
              String strText;
              try {
                strText = this.getText(iRangeStart, iRangeEnd - iRangeStart);
                if(strText.equals("\n")) {
                  //iBreakCount++;
                iTotalWidth += SwingUtilities.computeStringWidth(fontMetrics, strText);
              catch (BadLocationException ex) {
                //Something happened.....don't care....just eat the exception
        m_iMaxFontHeight = iMaxHeight;
        m_iWidthOfContent = iTotalWidth;
        m_iHardBreakCount = iHardBreakCount;
        if(iWidth > 0) {
          int iLineCount = (iTotalWidth / iWidth) + iBreakCount;
          return iLineCount;
        return 1;
      }And here is the code from my TableCellRenderer that uses the above information
       public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
                                                      boolean hasFocus, int row, int column) {
         if(ValidationHelper.hasText(value) && value.toString().indexOf("<html>") != -1) {
           UCSHTMLTextPane pane = new UCSHTMLTextPane();
           pane.setText(ValidationHelper.getTrimmedText(value.toString()));
           BigDecimal lWidthCell = new BigDecimal(table.getCellRect(row, column, false).getWidth() - 15);
           BigDecimal lWidthContent = new BigDecimal(pane.getWidthOfContent(lWidthCell.intValue()));
           int iHardBreakCount = pane.getHardBreakCount();
           BigDecimal lLineCount = lWidthContent.divide(lWidthCell, BigDecimal.ROUND_CEILING);
           int iLineCount = lLineCount.intValue();
           double dWidthCell = lWidthCell.doubleValue();
           double dWidthContent = lWidthContent.doubleValue();
           double dWidthContentPlusFivePercent = dWidthContent + (dWidthContent * .01);
           double dWidthContentMinumFivePercent = dWidthContent - (dWidthContent * .01);
           if(dWidthCell >= dWidthContentMinumFivePercent && dWidthCell <= dWidthContentPlusFivePercent) {
             iLineCount++;
           iLineCount += iHardBreakCount;
           int iMaxFontHeight = pane.getMaxFontHeight();
           int iHeight = (iMaxFontHeight * iLineCount) + 5;
           if ( (iLineCount > 0) && (table.getRowHeight(row) != iHeight)) {
             pane.setPreferredSize(new Dimension(0, iHeight));
             if(m_bAutoAdjustHeight) {
               table.setRowHeight(row, iHeight);
           if(iLineCount == 1) {
             if(iHeight != table.getRowHeight()) {
               if(m_bAutoAdjustHeight) {
                 table.setRowHeight(iHeight);
           setComponentUI(pane, table, row, column, isSelected, hasFocus);
           return pane;
    }Any suggestions?

    Hello,
    You must initialize correctly your JTextPane like this:
    javax.swing.text.html.HTMLEditorKit htmlEditorKit = new javax.swing.text.html.HTMLEditorKit();
    javax.swing.text.html.HTMLDocument htmlDoc = (javax.swing.text.html.HTMLDocument)htmlEditorKit.createDefaultDocument();
    setEditorKit(htmlEditorKit);
    setDocument(htmlDoc);
    setEditable(true);
    setContentType("text/html");

  • JTextPane and HTML form

    I'd like to display html page containing simple HTML form. JTectPane renders tis form very good but i sthere any way to handle any data change/submit on such a form in JTextPane

    Hi,
    Take a look at this example
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    public class TestShowPage {
    public static void main(String args[]) { 
    JTextPane tp = new JTextPane();
    JScrollPane js = new JScrollPane();
    js.getViewport().add(tp);
    JFrame jf = new JFrame();
    jf.getContentPane().add(js);
    jf.pack();
    jf.setSize(400,500);
    jf.setVisible(true);
    try {
    URL url = new URL("http://www.globalleafs.com/Download.html" );
    tp.setPage(url);
    catch (Exception e) {
    e.printStackTrace();
    Just compile and run the programme. see the output. If you need more info of such type of programmes, check http://www.globalleafs.com/Download.html
    Uma
    Java Developer
    http://www.globalleafs.com

  • JTextPane and HTML

    My pane is continuing to display the text as plain text instead of html. Why is that?
    JTextPane p=new JTextPane(new HTMLDocument());
    add(p);
    String html="<html><body>TEST</body></html>
    p.setText(html);From what I've learned from the documentation, the pane is initialised with html. When using setText(), the pane still keeps it html style. So, why am I getting plain text???

    If I explicitly use setContentType("text/html") it works.
    But it only works for small html pages. If I use a setText for a page greater than 50k, the page is blank. After that, a getText() results in this:
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>
    Is there a maximum?

  • Problem: FlashPlayer 10.1 XML and HTML-Entity Rendering problem

    Hi,
    I have some problems using
    childNode[0].nodeValue
    and HTML Entities since updating my FlashPlayer from version 10.0 to 10.1
    First some information about my system:
    FlashPlayer: WIN 10,1,53,64
    OS: WinXP (32bit)
    Browser: Firefox 3.6.6; IE 7.0.5730.13
    I am handling XML data which contains for example some HTML Entities like "&lt;" or "&gt;". A XML-Parser reads the nodeValue and puts the text into a HTML enabled textfield. Now FlashPlayer Version 10.1 does not display the text after "&lt".
    For example the following text in XML:
    <![CDATA[<ul><li>pressure &lt; 250bar</li>
    is rendered as "pressure". Debugging the application shows, that after getting the Text with
    childNode[0].nodeValue
    returns "pressure < 25bar" so HTML textfield interprets the "<" as a HTML Tag.
    Possible Workaround: Using
    <![CDATA[<ul><li>pressure %30C; 250bar</li>
    and replacing it after reading the nodeValue with "&lt;" solves the problem.
    Ist there any other solution without changing my XML Contents? Can I tell Flash or my XMLParser that HTML Tags must not be replaced?
    Thank's for any idea and help.

    Investigate the problem, but did not become easier.
    When calling external function used method "<invoke name="function" returntype="xml"><arguments><string>.....</string></arguments></invoke>" flashplayer remove from string value tag "CDATA".
    This is as in 10.0 player so and in 10.1.
    But after install 10.1 version string exposed decoding. All escape symbols convert to real char data.
    Example:
    "and WELL-FORMED&lt;/b&gt;&lt;/font&gt; HTML"
    =>
    "and WELL-FORMED</b></font> HTML"
    So as CDATA deleted is abnormal decoding XML data in the AS code.
    Who ever can help overcome this unnecessary effect?

  • HTML Rendering for printer

    From an HTML document, how do I render it and send it to the printer?
    Swing JTextPane has the capability of HTML rendering, but it does not fully support CSS, so I need something like that but with full support for CSS.

    how does it works, it's free?
    Is it fully embedded in java or is architecture
    dependent?Is google broken on your computer?

  • HTML Rendering for PDF

    <div><font face="Arial" size="2"><span class="493345917-06032007">We viewed a demo on webElements and have a question about something that was mentioned in that demo, i.e. "You can create a PDF report, but you have to do some tricks."  </span></font><font face="Arial" size="2"><span class="493345917-06032007">We need to know what those tricks are! <hr /></span></font></div><div><span class="493345917-06032007"><font face="Arial"><font size="2">The background on our particular situation is this:</font></font></span></div><ul><li><font face="Arial" size="2"><span class="493345917-06032007">We want to incorporate a text editor, similar to this one, in various forms to allow formatting of text in long text fields.</span></font></li><li><font face="Arial"><font size="2"><span class="493345917-06032007">The HTML output will be stored in / retrieved from a<span class="981485618-06032007"> SQL</span> database.</span> </font></font></li><li><font face="Arial"><font size="2"><span class="493345917-06032007">We need to be able to use/modify existing reports generated through Crystal to create PDF output.</span> </font></font></li><li><font face="Arial"><font size="2"><span class="493345917-06032007">The HTML formatting functionality built into Crystal XI report items does not appear to be adequate, since it does not handle several HTML tags that we need - bulleted/ordered lists, perhaps tables.</span> </font></font></li><li><font face="Arial"><font size="2"><span class="493345917-06032007"> We are using java on WebSphere application servers, with embedded Crystal reports. We do have Business Objects Enterprise available, but it is not configured for HTML pass-through, or webElements yet.</span> </font></font></li><li><font face="Arial" size="2"><span class="493345917-06032007">We want to use Enterprise, but if it doesn&#39;t solve our immediate problem (creating PDFs with embedded HTML, rendered properly) we will work on getting that set up later.</span></font></li></ul><div><font face="Arial" size="2"><span class="493345917-06032007"><hr />Bottom line question --  Can we expect that the PDF generation from HTML data fields in webElements/Enterprise is better than that which exists in Crystal standalone?</span></font></div><div><span class="493345917-06032007"><font face="Arial"><font size="2"><span class="981485618-06032007">And/o</span>r - do you have "tricks" that you can share that will help?<span class="981485618-06032007"> </span></font></font></span></div><div><span class="493345917-06032007"><font face="Arial"><font size="2"><br /><span class="981485618-06032007">Thanks for any help you can offer,</span></font></font></span></div><div><span class="493345917-06032007"><font face="Arial"><font size="2"><span class="981485618-06032007">Fran </span></font></font></span></div>

    <p>hello,</p><p>the webelements library uses a feature of pass-through html available in xi & xir2. activating pass through html allows the report developer to embed html into a report so one can create custom html that would not work by formatting a field or text object to display as html.</p><p>pass-through html will not render controls on pdf exports and will show up as regular text in pdf.</p><p>you might have miscronstrued a portion of the demo where it was mentioned that one could get around pass-through html showing up as text in pdf...the workaround is to hide this text and does not render the actual web controls.</p><p>jw</p>

  • I am in the process of expanding a database of chemistry journal articles.  These materials are ideally acquired in two formats when both are available-- PDF and HTML.  To oversimplify, PDFs are for the user to read, and derivatives of the HTML versions a

    I am in the process of expanding a database of chemistry journal articles.  These materials are ideally acquired in two formats when both are available-- PDF and HTML.  To oversimplify, PDFs are for the user to read, and derivatives of the HTML versions are for the computer to read.  Both formats are, of course, readily recognized and indexed by Spotlight.  Journal articles have two essential components with regards to a database:  the topical content of the article itself, and the cited references to other scientific literature.  While a PDF merely lists these references, the HTML version has, in addition, links to the cited items.  Each link URL contains the digital object identifier (doi) for the item it points to. A doi is a unique string that points to one and only one object, and can be quite useful if rendered in a manner that enables indexing by Spotlight.  Embedded URL's are, of course, ignored by Spotlight.  As a result, HTML-formatted articles must be processed so that URL's are openly displayed as readable text before Spotlight will recognize them.  Conversion to DOC format using MS Word, followed by conversion to RTF using Text Edit accomplishes this, but is quite labor intensive.
      In the last few months, I have added about 3,500 articles to this collection, which means that any procedure for rendering URL's must be automated and able to process large batches of documents with minimal user oversight.  This procedure needs to generate a separate file for each HTML document processed. Trials using Automator's "Get Specified Finder Items" and "Get Selected Finder Items", as well as "Ask For Finder Items"  (along with "Get URLs From Web Pages") give unsatisfactory results.  When provided with multiple input documents, these three commands generate output in which the URLs from multiple input items are merged into a single block, which yields a single file using "Create New Word Document" as the subsequent step.  A one-to-one, input file to output file result can be obtained by processing one file at a time, but this requires manual selection of each item and one-at-a-time processing. What I need is a command that accepts multiple input documents, but processes them one at a time, generating a separate output for each file processed.  Is there a way for Automator to do this?

    Hi,
    With the project all done, i'm preparing for the presentation. Managed to get my hands on a HD beamer for the night (Epason TW2000) and planning to do the presentation in HD.
    That of course managed to bring up some problems. I posted a thread which i'll repost here . Sorry for the repost, i normally do not intend to do this, but since this thread is actually about the same thing, i'd like to ask the same question to you. The end version is in AfterEffects, but that actually doesn't alter the question. It's about export:
    "I want to export my AE project of approx 30 min containing several HD files to a Blu Ray disc. The end goal is to project the video in HD quality using the Epson  EMP-TW2000 projector. This projector is HD compatible.
    To project the video I need to connect the beamer to a computer capable of playing a heavy HD file (1), OR burn the project to a BRD (2) and play it using a BRplayer.
    I prefer option 2, so my question is: which would be the preferred export preset?
    Project specs:
                        - 1920x1080 sq pix  (16:9)
                        - 25 fps
                        - my imported video files (Prem.Pro sequences) are also 25 fps and are Progressive (!)
    To export to a BRD compatible format, do i not encounter a big problem: my projectfiles are 25 fps and progressive, and I believe that the only Bluray preset dispaying 1920x1080 with 25 fps requests an INTERLACED video  (I viewed the presets found on this forum, this thread)... There is also a Progr. format, BUT then you need 30 fps (29,...).
    So, is there one dimension that can be changed without changing the content of the video, and if yes which one (either the interlacing or the fps).
    I'm not very familiar with the whole Blu-ray thing, I hope that someone can help me out."
    Please give it a look.
    Thanks,
    Jef

  • Obnoxious JTextPane and JScrollPane problem.

    I have written a Tailing program. All works great except for one really annoying issue with my JScollPane. I will do my best to explain the problem:
    The program will continue tailing a file and adding the text to the JTextPane. When a user scrolls up on the JScrollPane, the program still adds the text to the bottom of the JTextPane and the user can continue to view what they need.
    Here is the problem: I have text being colored throughout the text pane. For instance, the word ERROR will be in red. The problem is when the program colors the text, it moves the scroll pane to the line where word that was colored is at. I don't want that. If the user moves the scroll bar, I want the scroll bar to always stay there. I don't want the program to move to the text that was just colored.
    Is there a way to turn that off? I can't find anything like that anywhere.

    Coloring text will not cause the scrollpane to scroll.
    You must be playing with the caret position or something.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Fonts used in HTML rendered components not displayed

    Hi all,
    I have a problem using fonts in components with text that is being rendered by the HTML renderer.
    It's the exact same problem as described in this topic;
    http://forum.java.sun.com/thread.jspa?forumID=257&threadID=222691
    but no solution found...
    When I do this, my font isn't displayed (only the default SansSerif font is used at this point);
    JLabel label = new JLabel("<html>a text</html>");
    InputStream fontStream = getClass().getResourceAsStream("SystemVIO.ttf");
    Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
    label.setFont(font.deriveFont((float)12));SystemVIO is placed in a JAR-file (loaded in my classpath).
    And when I do this, it is displayed correctly;
    InputStream fontStream = getClass().getResourceAsStream("SystemVIO.ttf");
    Font font = Font.createFont(Font.TRUETYPE_FONT, fontStream);
    JLabel label = new JLabel("<html>a text</html>");
    label.setFont(font.deriveFont((float)12));But the real problem here is, if one component is made with a HTML renderer, none of the other components can use a font if it's loaded after the FIRST component with HTML renderering is constructed.
    So, for some reason, the fonts aren't reloaded in the HTML renderer (is the html renderer native?) whenever I use createFont().

    Hi Sundar,
    if I understand your post properly, what your are doing in your BSP is executing a procedure to create an Adobe document, and then placing that document into the HTTP response.
    If you have built this code by following some of the blogs in SDN, you probably do something like...
    response->set_header_field( name  = 'content-type'
                                value = 'application/pdf' ).
    l_pdf_len = XSTRLEN( l_pdf_xstring ).
    response->set_data( data   = l_pdf_xstring
                        length = l_pdf_len ).
    navigation->response_complete( ).
    What this code does is change the type of the HTTP response to 'application/pdf', set the content of the HTTP repsonse to the PDF data stream, and finally signal the HTTP runtime that processing has completed.
    Once processing has been completed control is returned to the HTTP runtime. This means any further 'down-stream' code in your BSP will not be executed. This includes the Layout section of your BSP.
    It is not possible to send two responses, PDF data and HTML data, to a single HTTP request. If you want to show both on the same web page you need to embed the Adobe document into the HTML page using frames or some other method.
    Cheers
    Graham Robbo

  • I have the current Mac Pro the entry level with the default specification and i feel some slow performance when applying after effects on my videos using final cut pro and also rendering a video takes long time ? what upgrades do you guys suggest?

    i have the current Mac Pro the entry level with the default configuration   and i feel lack of  performance when applying after effects on my videos using final cut pro and also rendering a video takes long time ? what upgrades do you guys suggest i could do on my Mac Pro ?

    256GB SSD  it shipped with will run low and one of the things to watch.
    Default memory is 12GB  also something to think about.
    D500 and FCP-X 10.1+
    http://macperformanceguide.com/index_topics.html#MacPro2013Performance
    Five models of 2013 Mac Pro running Resolve, FCPX, After Effects, Photoshop, and Aperture

  • Change report manager HTML rendering view %

    Hi All,
    I can change the default HTML Zoom % in report server reports accessed via URL. Add "&rc:Zoom=75 " to the URL and it works. However I cannot change the zoom for report manager reports. Is there any workaround to this? or better idea to change
    HTML rendering?
    Thanks

    Hi sonnyA,
    According to your description, you want to set the default zoom level when accessing reports in Report Manager. Right?
    In Reporting Services, the Zoom is already a deprecated property in HTML Device Information Settings. Change the <Zoom> tab in rsreportserver.config will not work. In this scenario, we can embed javascript in Report.aspx page to get the zoom
    selection box object and set the zoom level. Please follow the steps below:
    1. Go to Report.aspx, this file locates at C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportManager\Pages,
    embed the code below:
    <script>
    function pageLoad() {
            var cuInternalViewer = $find('ctl32_ctl03');
                cuInternalViewer.set_zoomLevel(75);
    </script>
    2. The result looks like below:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • RichEditableText: export().equals() and HTML export

    1. How can I find out that two richEditableText.export() are equal?
    At least the order of the attributes in the TextFlow element is random which means that exported strings cannot be compared directly. Take for example the trunk.mxml from http://bugs.adobe.com/jira/browse/SDK-21836 and compile+run it several times and you see the different order of attributes. Is there a utility method somewhere to compare two exports? (BTW releasing the source of TLF would ease these kind of bug hunting...)
    I know how to use richEditableText.textFlow.generation but this only indicates changes in the current component.
    2. Is supporting html import/export on the roadmap?
    (This question got burried in the information stream... http://forums.adobe.com/message/2042067#2042067)
    Gordon Smith: TLF's TextFilter class supports importers and exporters for HTML_FORMAT, but I haven't tried them and don't know how robust they are.
    I think the HTML export in TLF is not yet stable. The thing is that once
    it is stable there is pretty much no way to insert the import
    functionality into RichEditableText without rewriting most of the
    component. In my opinion, it should be either integrated into
    RichEditableText even at this early stage or RichEditableText should be
    refactored to allow extending it in an easier way.
    Thanks for any hints,
    Marc

    Hi Abhishek,
    Nice conversation I do not expect that TLF covers the full HTML standard. After all, browsers are too good when it comes to HTML rendering...
    with varying degrees of fidelity.
    I remember reading in the TLF forum, that HTML import/export was experimental. That's why I wrote that HTML is not ready for prime time. Also your comment shows that HTML is a poor choice from a Flex perspective. Unfortunately, it's unclear what varying degrees of fidelity really means as I'm not aware of any precise documentation or code.
    Concerning your idea about passing around a (mutable) instance of TextFlow, I'm not a great fan. The power of markup is besides others, that it is a comparable description of content and format. So I definitely prefer an equal function. If this function doesn't make it into the Flex 4 release, I  reluctantly add to each TLF markup a dirty flag which is based on TextFlow.generation.
    As mentioned before, I prefer TLF could export all content and formatting into HTML compliant format. There are many reasons why HTML is a huge benefit over any new, widely undocumented format (this is not specific to TLF or FXG). A few reasons that come to my mind:
    - Server side: Apache Lucene has a battle-proof extractor. With TLF or FXG, I had to write and configure my own.
    - Server side: Extract and modify links in content. This is obviously very easy with HTML as there are age-old libs available.
    - Flash Player: Compare two TLF markups. There might be also no actionscript lib for HTML available. But I'd happily start a project for HTML but not for a new format without underlining code and thorough doc.
    - HTTP communication: what's the mime type of TLF or FXG?
    - Every developer knows HTML, TLF/FXG must be learned. I regard this learning as a high barrier as TLF does not seem to be a big step forward compared to HTML.
    Note that I don't prefer HTML because it is an "open standard". It's because the whole world knows HTML and that brings a much higher engineering efficiency (and that's maybe due to the open standard). If not all information of TLF can be export HTML, it's a pity but just document it.
    Looking forward to your thoughts/comments,
    Marc
    abhishek.g wrote: Hi Marc,
    Thanks for your reply.
    TLF supports many different markup formats (TLF, FXG, Plain text, HTML) with varying degrees of fidelity. It would simply not do to compare HTML because there isn't a 1:1 correspondence between TLF and HTML capabilities. From that perspective, TLF format would be your best bet though I realize there is the problem of inconsistent attribute order.
    Perhaps your scenario is better addressed by having utilities to compare TextFlow instances rather than comparing corresponding markup (this needs additional thought).
    As for HTML import/export, it is obviously be beyond TLF's scope to implement the full HTML standard. The current implementation is loosely based on the HTML capabilities of flash.text.TextField (see htmlText property), which itself is a small subset of the standard, and deviates from it in some ways. When you say HTML support is not ready for prime time, are you referring to this limited scope, or have you encountered specific bugs in the implementation? If the former, I'd like to know what your expectations are. If the latter, please report them.
    Thanks
    Abhishek
    (Adobe Systems Inc.)
    This message was sent to: faindu
    To post a reply to the thread message, either reply to this email or visit the message page:
    http://forums.adobe.com/message/2059470#2059470
    --end--
    mail transfer stalled...

  • Bookmarks.html Renders Very Differently in FireFox 4

    For years, I have been using and loving Firefox (including 4.0).
    For years, I have also exported my bookmarks out of Firefox and use the resulting bookmarks.html file as my home page.
    Now Firefox 4 renders the bookmarks.html file very differently from previous versions of Firefox and also differently from other browsers (eg, IE).
    The indentations have disappeared when viewing bookmarks.html in Firefox 4. Unfortunately, it's not really easy to show you this inside this forum text box, but I will try.
    Firefox 4 shows something like this:
    '''Bookmarks Menu'''
    '''General Interest'''
    Markham Weather Forecast - Environment Canada
    The Weather Network - Markham
    The Weather Channel - Markham
    AccuWeather.com - Canadian Forecast Center
    ... etc
    Firefox 3.6, IE, and other browsers show something like this (note the indentations which greatly improve readability):
    '''Bookmarks Menu'''
    '''General Interest'''
    Markham Weather Forecast - Environment Canada
    The Weather Network - Markham
    The Weather Channel - Markham
    AccuWeather.com - Canadian Forecast Center
    ... etc
    Is this a bug in Firefox 4?? I would really like to see bookmarks.html rendered with the indentations.
    Am I missing something?
    Thanks.

    '''Cor-el''' - is there a way that can be added to the bookmarks.html file, instead of having to click on a bookmarklet each time the page is opened?

  • How to include javascript and HTML in analysis output?

    Is there any document for that? Currently I set Treat Text As HTML under Data Format tab and include some simple HTML in Column formula, but I doubt it is correct way to include javascript and HTML in ayalysis output. Can anybody provide any idea or sample?
    Thanks

    Hi,
    i am not sure about javascript but yes treat text as Html is used to utilize HTML power in OBIEE.There are many examples of this.Common uses are a href,GoNav and PortalPagenav fuction.These function are mix of HTML and OBIEE.We gebrally use this option when we want to carry out some HTML operation on data rendered by OBIEE.Common example is to make data values a hyperlink for which we use a href
    See the below links for GoNav and a href
    http://108obiee.blogspot.com/2009/09/go-url-request-navigation-between.html
    Creating Hierarchies on Direct Database Requests
    You can also write java scripts here.
    Regards,
    Sandeep

Maybe you are looking for

  • Itunes 100 percent CPU

    I am running Itunes and my CPU is running at 100% also when trying to go onto the iTunes Store it just says "accessing iTunes Store" and hangs there. There was an update available so I tried to update which resulted in getting an error when installin

  • Incorrect sound after burn

    We have just bought Apple G5's for our school, so students can video edit. So far there has been no problems. But lately a couple of machines have started burning another soundtrack onto the completed movie. The preview looks and sounds correct. Seve

  • How To Apply Filter on LTS? OBIEE 11g

    Hello, I have a requirement of applying following filter: DELETE_FLG='N' on the LTS of some logical tables in BMM layer. This column is currently present only in physical layer and not in the BMM layer. Can you tell me exactly where and how this can

  • Personal Address Book in clients other than Outlook ( e.g. Thunderbird )

    Does anybody know what the latest is on PAB integration in Thunderbird. This is a big turn-off for using JES. I am looking at the JCS for two reasons 1.) as an alternative to Ms proprietary lock-in and 2.) for an more open platform to integrate a som

  • How do I get pics from Preview into iphoto?

    How do I get pics from Preview into iphoto?