TX Text Control .NET Server

What's New in TX Text Control 20.0

Topic

Right-to-left languages such as Arabic and Hebrew arrived in TX Text Control with version 20.0. The version also formats text for a language, hyphenates it with TX Spell .NET and merges business objects and data relations in MailMerge.

Version 20.0 was released in November 2013 as TX Text Control X10, together with TX Spell .NET 4.0 and TX Barcode .NET 3.0. The press release Press Release: TX Text Control X10 Released - Reporting and Right-to-Left Support also says that all components became fully compatible with multi-threading, which speeds up the creation of documents in batches. Features of the Windows Forms and WPF controls, such as the right-to-left design of the controls, the language dialog box and new button bar buttons, aren't listed here.

Version 20.0 at a Glance

AreaWhat is new
Right-to-left textBidirectional lines, right-to-left paragraphs, Arabic Kashida justification
LanguagesA language for each piece of text, used for spell checking and hyphenation
HyphenationAutomatic hyphenation with TX Spell .NET 4.0
Mail mergeData relations in every Merge overload, MergeObjects, image merging by name, NEXT and NEXTIF fields, report data source configurations
Page imagesImages of pages with the elements shown on screen

Right-to-Left Text

  • Bidirectional lines. A line can contain text written from left to right and text written from right to left. Behind a left-to-right character, the input position is on its right side; behind a right-to-left character, it is on its left side.
  • Paragraph direction. ParagraphFormat.Direction formats a paragraph from right to left with the Direction value RightToLeft, so that its blocks of bidirectional text are ordered from right to left. In such a paragraph, a tab position is measured from the right page margin, and the natural alignment and the natural tab kind are right-aligned.
  • Change the direction. Selection.ChangeDirection changes the writing direction of the selected paragraphs. It swaps left and right alignment and left and right tabs; centered and justified paragraphs keep their alignment.
  • Kashida justification. Justified Arabic text can be stretched with Kashida lines instead of, or in addition to, wider spaces. ParagraphFormat.Justification takes a Justification value: Spaces, Kashida or SpacesAndKashida.
  • Input format. InputFormat.LeftToRight and InputFormat.RightToLeft tell the direction at the input position.

Paragraphs shows how to format paragraphs in the current version.

Languages and Hyphenation

Spell Checking and Hyphenation covers spell checking and hyphenation in the current version.

Mail Merge

MailMerge creates documents from a template and data. Version 20.0 extended it considerably:

  • Data relations in every overload. All overloads of Merge process the relations between the tables of the data, which makes master-detail templates such as invoices with line items easier to merge. MergeBlocks is obsolete: it needed an extra merge block around the whole document for the same result.
  • Business objects. MergeObjects merges any System.Collections.IEnumerable of objects into the template; collections of Dictionary instances followed in Version 24.0. See Data Sources.
  • Images. Images in the template are replaced by name with the image data of the column of the same name and scaled to the width of the placeholder image. The column holds a byte array, System.Drawing.Image objects, file names or hexadecimal strings that start with X'. The ImageMerged event passes an ImageMergedEventArgs object. Column names of image merge fields no longer need the prefix image:, which still works. See Images.
  • Formats of merge fields. MergeField.DateTimeFormat and MergeField.NumericFormat hold the date and time format and the numeric format of a MERGEFIELD, which its field dialog box can now set.
  • NEXT and NEXTIF fields. The adapters NextField and NextIfField implement the MS Word fields NEXT and NEXTIF. See Conditional Content.
  • Report data source configurations. ReportDataSourceConfigFile takes the path of a report data source configuration file (.rdsc) created with TX Text Control Words, and ReportDataSourceConfig takes the same content as an XML string.
  • Template file. TemplateFile sets the path of the template, instead of calling LoadTemplate. The format is taken from the file extension.

Pages and Input Position

  • Screen elements in page images. The PageContent value ScreenElements makes Page.GetImage include what a screen shows in addition to the text, such as the selection, control characters and helper lines.
  • Caret size. InputPosition.CaretSize gets the size of the caret at the input position, in pixels.

Upgrade to Version 20.0

  • MergeBlocks. MailMerge.MergeBlocks is obsolete. Merge templates with Merge and pass the data with its relations. Deprecated APIs describes the replacement.
  • PageContent. The PageContent enumeration has the new value ScreenElements.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 20.0 lists for TX Text Control .NET Server. Names are relative to the TXTextControl namespace, each name links to its current reference page, and "(obsolete)" marks a member that is obsolete today.

New Classes

Members by Class

Next Steps

  • Version 21.0: the features of the next version.
  • Version 19.0: barcodes, even and odd headers and footers and page numbering.
  • Merge Blocks: repeat parts of a template for the records of a table.