Tiny RTF Viewer 2.8 free Summer Special

Habarisoft released Tiny RTF Viewer 2.8 for Android™. This app converts Rich Text Format documents to HTML, and displays them in the internal web browser.

Summer Special: the app is available for free until Wednesday 28 June 2017.

Get it on Google Play

For the conversion from Rich Text Format to HTML5, the app uses ScroogeXHTML for the Java™ platform 6.3.1.

scrooge_portrait_logo_2016

Android is a trademark of Google Inc. ♦ Google Play is a trademark of Google Inc.

ScroogeXHTML for the Java™ platform 6.3.1 – fast RTF to HTML5 and XHTML conversion

Habarisoft released version 6.3.1 of its RTF to HTML5 and XHTML converter library, ScroogeXHTML for the Java™ platform.

The new version introduces four enhancements and two fixes. Release notes are available on the ScroogeXHTML web site and in the HTML API documentation.

Starting with release 6.3.1, progress listeners are deprecated. They will be removed in a future version to improve conversion speed. See all deprecated methods.

Online demo

You can evaluate the new release with the online converter demo, which displays the configuration property values of the converter, and allows to modify many of them. The demo page also links to a demo of a preview (or a development snapshot) of the next version when it becomes available.

scrooge_portrait_logo_2016

ScroogeXHTML for Delphi 6.15 released

ScroogeXHTML for Delphi is a library which can convert a subset of the RTF standard to XHTML and HTML5. It is compatible with Delphi 2009+ and Free Pascal 3.0.

Version 6.15 introduces support for DBCS encoded font names, and fixes Symbol font conversion with Free Pascal. It also uses the standard string type now instead of the SXText type.

As a special offer, every purchase of a Single Developer license now includes Server Deployment licenses for 2000 concurrent users.

Home page, API, Getting Started PDF and demo download: https://www.scroogexhtml.com/scroogexhtml_delphi.html

scrooge_portrait_logo_2016.png.html

ScroogeXHTML-LibreOffice-Example-HTML5

ScroogeXHTML for Delphi 6.14 released

ScroogeXHTML for Delphi is a library which can convert a subset of the RTF standard to XHTML and HTML5. It is compatible with Delphi 2009+ and Free Pascal 3.0.

Version 6.14 introduces support for paragraph background colors and paragraph box borders. It also fixes Free Pascal warnings and Unicode character conversion.

As a special offer, every purchase of a Single Developer license now includes Server Deployment licenses for 2000 concurrent users – see blog article

Home page, API, Getting Started PDF and demo download: https://www.scroogexhtml.com/scroogexhtml_delphi.html

scrooge_portrait_logo_2016.png.html

ScroogeXHTML-LibreOffice-Example-HTML5

ScroogeXHTML for Delphi 6.12 released

ScroogeXHTML for Delphi is a library which can convert a subset of the RTF standard to XHTML and HTML5. It is compatible with Delphi 2009+ and Free Pascal 3.0. Version 6.12 introduces support for space before and after paragraphs. It also fixes “mailto:” protocol hyperlinks.

As a special offer, every purchase of a Single Developer license now includes Server Deployment licenses for 2000 concurrent users – see blog article

Home page, API, Getting Started PDF and demo download: https://www.scroogexhtml.com/scroogexhtml_delphi.html

scrooge_portrait_logo_2016.png.html

RTF hyperlink conversion with ScroogeXHTML (XPath based post processing)

ScroogeXHTML for the Java platform supports hyperlink conversion to HTML in two ways. Many RTF documents use special RTF keywords which include the hyperlink target as “invisible” text, so that the HTTP address was already available in the document. Other RTF documents however only use underlined and blue text, but no hidden HTTP link addresses. In this case, the conversion requires a different solution.

Earlier versions of ScroogeXHTML used a hard-coded solution for text-to-hyperlink conversion, which did not support advanced tweaks and manipulations of the result HTML.

Now, the next release of ScroogeXHTML provides an XPath based post processor class, as a starting point for customized blue/underlined hyperlink conversion.

One line of code is required to add the post processor class:

scrooge.getPostProcessListeners()
       .add(new ConvertUnderlinedToHyperlinks());

The post processor will locate all text elements which are underlined and blue, and turn it into a hyperlink.

With some custom code, the post processor may be adjusted to your special needs, for example it may use a dictionary (map) to assign specific URLs to the blue/underlined text.

Note: this is a breaking change, the next version will no longer have the property ConvertHyperlinksForBlueUnderlinedText.

Source code excerpt:

  @Override
  public void postProcess(PostProcessEventObject e) {
    try {
      XPathFactory xpathFactory = XPathFactory.newInstance();

      String exp = String.format("//span[contains(@style, 'color:%s;') and contains(@style ,'text-decoration:underline;') ]", color);
      XPathExpression xpathExp = xpathFactory.newXPath().compile(exp);

      NodeList hyperlinkNodes = (NodeList) xpathExp.evaluate(e.getDocument(), XPathConstants.NODESET);

      // Iterate over all found nodes
      for (int i = 0; i < hyperlinkNodes.getLength(); i++) {
        Element linkNode = (Element) hyperlinkNodes.item(i);

        // remove the hyperlink style
        String style = linkNode.getAttribute("style");
        style = style.replace("color:" + color + ";", "");
        style = style.replace("text-decoration:underline;", "");
        if (style.isEmpty()) {
          linkNode.removeAttribute("style");
        } else {
          linkNode.setAttribute("style", style);
        }

        // create anchor with href attribute
        Element anchor = e.getDocument().createElement("a");
        String linkText = linkNode.getTextContent();
        anchor.setAttribute("href", linkText);

        // insert the a element
        Node parent = linkNode.getParentNode();

        if (linkNode.getAttributes().getLength() == 0) {
          anchor.setTextContent(linkText);
          parent.removeChild(linkNode);
          parent.appendChild(anchor);
        } else {
          parent.insertBefore(anchor, linkNode);
          anchor.appendChild(linkNode);
        }
      }
    } catch (XPathExpressionException ex) {
      LOGGER.error(ex.getMessage(), ex);
    }
  }

Server Deployment licenses included with ScroogeXHTML for Delphi

ScroogeXHTML for Delphi is a library which can convert a subset of the RTF standard to XHTML and HTML5 at high speed.

As a special offer, every new purchase of a a Single Developer license now includes Server Deployment licenses for 2000 concurrent users at no extra costs. Server Deployment licenses do not expire, and are valid for all applications built with the library.

ScroogeXHTML is also available for the Java platform.

scrooge_portrait_logo_2016.png.html