Skip to content

1.2.0

Latest

Choose a tag to compare

@gvreddy04 gvreddy04 released this 26 Nov 18:18
e2cf2ad

Summary

UnlimitedPDF 1.2.0 adds right-to-left documents and 13 more scripts. Arabic, Persian, Urdu, Hebrew, Dhivehi, and other right-to-left languages read from the right, with English words, numbers, and brackets in place, and tables that start at the right. Bengali-Assamese, Gujarati, Gurmukhi, Odia, Kannada, Malayalam, Greek, Cyrillic, Armenian, and Georgian join Latin, Devanagari, Telugu, and Tamil, for 17 scripts in all. Code that works with 1.1.x compiles and runs as is, and left-to-right text keeps its direction and alignment.

dotnet add package UnlimitedPDF --version 1.2.0

What's New

  • Right-to-left documents. Set PdfDocument.TextDirection = PdfTextDirection.RightToLeft once. Text starts at the right edge, and a right-to-left table draws its first column at the right. Override the direction for one call with a PdfTextOptions argument, for one table with PdfTable.Direction, or for one cell with PdfCellText.Direction.
  • The Unicode Bidirectional Algorithm (Unicode 17.0.0) orders each line, so Latin words, numbers, and brackets inside Arabic or Hebrew read correctly. Copy, search, and read-aloud return the text in reading order.
  • Arabic, Hebrew, and Thaana shaping. Arabic-script letters take their joined forms, required ligatures such as Lam with Alef, their marks, and the cursive attachment Nastaliq fonts use. Persian, Urdu, Pashto, Sorani, Sindhi, Uyghur, and Jawi letters are covered. Hebrew points and Thaana vowel signs sit on their letters.
  • Start and End alignment (PdfTextAlignment, PdfCellHorizontalAlignment) follow the text's direction.
  • Direction in HTML. The dir attribute (ltr, rtl, auto), CSS direction, <bdi>, and <bdo> set direction; text-align: start and end, table columns, and list markers follow it.
  • Ten more scripts. Bengali-Assamese, Gujarati, Gurmukhi, Odia, Kannada, and Malayalam are shaped with the font's own rules, and Greek, Cyrillic, Armenian, and Georgian each use their own script's font rules.

What's Changed

  • Every alignment default is Start instead of Left. Left-to-right text draws byte for byte as before, and right-to-left text lands at the right edge without an argument.
  • Devanagari, Telugu, and Tamil use the same OpenType Indic rules as the new scripts, so some Hindi and Telugu words with a reph or below-base forms draw differently from 1.1.0.
  • HTML text-transform follows the lang attribute for Turkish and Azerbaijani (istanbul in uppercase is İSTANBUL), and uppercase turns dotless ı into I in every language.
  • Right-to-left letters of scripts that aren't shaped, such as Syriac and N'Ko, are reported as missing characters even when the font has them; bidirectional marks and controls are no longer reported.
  • The package's copyright holder is Vikram Reddy, and its release notes link the changelog.

Known limits

Right-to-left scripts other than Arabic, Hebrew, and Thaana aren't shaped. Chinese, Japanese, and Korean aren't supported. HTML unicode-bidi is ignored, and Arabic is justified by widening spaces, not by stretching letters.

Demos

The demo site adds a Right-to-left documents demo (Arabic, Persian, Urdu, Hebrew, and Dhivehi invoices, drawn with text calls or HTML), 24 languages and a mixed-script invoice in the Fonts and languages demo, six free PDF tools that run on your own files in the browser, and a PDF and C# code view with a complete console program for every demo.

Links