??????

??????

???????


That's right! With the release of pdfCalligraph 2.0.7, we are bringing the support of Thai (the official language of Thailand), Khmer (the official language of Cambodia) and Lao (the official language of Laos) to a whole new level!

Thanks to the ICU - International Components for Unicode project (and ICU4N!), we now support correct line breaks with these languages.

Don't forget that aside from iText 7 Core, iText pdfHTML also benefits from these changes.


You can compare the differences in the following example:

<html>
<head>
    <style>
        div {
            width: 100px;
            margin: left;
            border: 1px solid #73AD21;
        }
    </style>
</head>
<body>
<div>
    <div>
        <!--
        Meaning: "Today is good weather. If tomorrow the weather is good, we will have a picnic"
        ????????????? ???????????????????????????????????? - two sentences.
        -->
        <p>"\u0E2D\u0E32\u0E01\u0E32\u0E28\u0E14\u0E35\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49\u0020\u0E2B" +
            "\u0E32\u0E01\u0E2D\u0E32\u0E01\u0E32\u0E28\u0E14\u0E35\u0E43\u0E19\u0E27\u0E31\u0E19\u0E1E\u0E23" +
            "\u0E38\u0E48\u0E07\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E08\u0E30\u0E44\u0E1B\u0E1B\u0E34\u0E01" +
            "\u0E19\u0E34\u0E0"</p>
    </div>
</div>
</body>
</html>


Check out how this HTML gets rendered before and after this change (everyone likes a before and after image, right?)


Before:

 


After:

In addition, we also added support for wrapping at word boundaries for languages which don't use spaces for word separation, such as Thai and Khmer. Check out our example linked below for more details.


As mentioned above, none of this would've been possible without the ICU project, and it's Java and C# language wrappers/ports. We would like to thank, besides the ICU - International Components for Unicode project, Shad Storhaug for having kindly accepted both of our PRs (Pull Requests), for the ICU4N project ("a set of .NET libraries providing Unicode and Globalization support for software applications, a .NET port of the popular ICU4J project") and for the J2N project ("a library that helps bridge the gap between .NET and Java").

We will be sponsoring Shad so that he continue to provide the open source community with great projects, and great code! Thank you Shad!

Release Related Examples


Improvements

  • Support wrapping at word boundaries for languages which don't use spaces for word separation.
     


Installation Instructions

Examples (latest ones)

FAQ (latest ones)