What's New in TX Text Control .NET for Windows Forms 15.0
Documents gained columns, PDF/A archiving and a PDF import in TX Text Control .NET for Windows Forms 15.0. The version also made paragraphs programmable as objects, let applications change how the TextControl pastes from the clipboard, added a button for structured lists and introduced the field adapters of the DocumentServer.Fields namespace.
Version 15.0 was released in May 2009 for the server and the client products, as the press release Press Release: TX Text Control 15.0 is Released announced. Its PDF/A export produces PDF/A-1b documents. The version's ASP.NET DocumentViewer, a web component for viewing documents in the browser, came with TX Text Control Server for ASP.NET and isn't part of TX Text Control .NET for Windows Forms.
Version 15.0 at a Glance
| Area | What is new |
|---|---|
| Columns | Text arranged in columns, per section, with a Page Setup tab and columns in the ruler bar |
| PDF/A-1 Level B export, text import from PDF documents | |
| Lists | Structured numbered lists, longer text before and after the number, a button bar button |
| Paragraphs | A collection of Paragraph objects for each text part |
| Clipboard | Custom handling of clipboard formats when pasting |
| Page images | An image of the content of a page |
| Fields | The DocumentServer.Fields namespace with adapters for MS Word fields |
| Mail merge | IF, DATE and INCLUDETEXT fields, events for merged fields and included documents |
Columns
The text of a section can be arranged in columns, so that one page can have different numbers of columns where a section begins. SectionFormat.Columns sets the number of columns. When EqualColumnWidth is true, which is the default, all columns get the same width, calculated from the page size. Otherwise, ColumnWidths and ColumnDistances set each width and distance, and ColumnLineColor and ColumnLineWidth draw a line between the columns.
Users make the same settings on a new tab of the Page Setup dialog box, and the ruler bar shows the widths of the columns and the distances between them. SHIFT+CTRL+ENTER inserts a column break, which continues the text in the next column. See Sections and Page Layout.
PDF/A and PDF Import
- PDF/A. Documents can be saved as PDF/A-1 Level B, the ISO standard for archiving, with the StreamType and BinaryStreamType value
AdobePDFAand everySavemethod ofTextControl. Besides the content of a standard PDF document, a PDF/A document contains only embeddable fonts, stores document data such as the title and the author as XMP, describes which characters of a font are used and contains a color profile. Links that start other applications and access restrictions aren't allowed, so SaveSettings.DocumentAccessPermissions is ignored. See PDF/A. - Fonts for PDF/A. Set FontSettings.EmbeddableFontsOnly of TextControl.FontSettings to
truebefore you save, so that the document contains only embeddable fonts. The AdaptFont event, switched on with FontSettings.AdaptFontEvent, controls which font replaces one that can't be used; its AdaptFontEventArgs give the font name, the adapted font name and the supported fonts. See Font Embedding and Substitution. - PDF import. The
StreamTypevalueAdobePDFloads the text of a PDF document with allLoadmethods ofTextControl. Because PDF describes where characters are and not how the document is structured, the import filter either makes each line a paragraph, builds paragraphs from the text flow or creates a text frame for each block of text at its original position. LoadSettings.PDFImportSettings selects the mode with a PDFImportSettings value. See PDF Import and Its Limitations.
Lists, Paragraphs and Pages
- Structured lists. The ListType value
Structuredshows the numbers of all higher levels in front of the number of a list item, together with the text before and after them. ListFormat.TextBeforeNumber and ListFormat.TextAfterNumber hold text longer than one character. TheButtonBarhas a new button for structured lists, and itsButtonPositions,ButtonOffsetsandButtonSeparatorsproperties include it. See Bullets and Numbered Lists. - Paragraphs. TextControl.Paragraphs returns a ParagraphCollection; headers and footers and text frames have their own. Each Paragraph has its Format, ListFormat and FormattingStyle, its first character and line, its length, its lines and its Text. ListNumber and ListNumberText give its number in a list, and Save saves it in a format. See Text, Paragraphs, and Stylesheets.
- Page images. Page.GetImage returns the content of a page as an enhanced metafile or as a bitmap in screen resolution.
Clipboard
Applications can change how the TextControl pastes data from the clipboard. TextControl.GetClipboardFormats returns the formats of the data on the clipboard, and a new overload of TextControl.Paste pastes the data in a chosen format. See Clipboard Operations.
Field Adapters and Mail Merge
- Field adapters. The new DocumentServer.Fields namespace provides adapters for the MS Word merge fields and form fields that
MailMergeuses: MergeField, FormText, FormCheckBox, FormDropDown, IfField, DateField and IncludeText. They create and change these fields without editing ApplicationField.Parameters by hand. See Fields and Subtext Parts. - New field types in mail merge. MailMerge processes the MS Word fields IF, DATE and INCLUDETEXT. See Conditional Content.
- Events. FieldMerged occurs for each merged field, and IncludeTextMerging for each document that an INCLUDETEXT field includes.
- Search path. SearchPath names the directory where subtemplates and images are searched.
- Document controller. The member list also names DocumentServer.DocumentController, which handles the document on the server for the ASP.NET DocumentViewer. It loads and saves documents, returns the field adapters of a document with GetFieldAdapters and sets the value of a form field with MergeField.
Upgrade to Version 15.0
- List text. ListFormat.TextBeforeNumber and ListFormat.TextAfterNumber replace ListFormat.CharBeforeNumber and ListFormat.CharAfterNumber, which remain for compatibility and shouldn't be used in new code. See Deprecated APIs.
- Obsolete text field property. The member list of version 15.0 marks TextField.ShowActivated as obsolete.
New Classes, Properties, Methods and Events
The classes and members below are the ones that the What's New documentation of version 15.0 lists for TX Text Control .NET for Windows Forms. Names are relative to the TXTextControl namespace, each name links to its current reference page, and "(obsolete)" marks a member that is obsolete today. The version's own list also names TextField and TextControl as new classes. TextFieldCollection handled TextField objects in version 13.0, and version 11.0 already extended TextControl with automatic resizing, so neither is listed under New Classes; most of the TextControl members in the table below date from earlier versions.
New Classes
- AdaptFontEventArgs
- DocumentServer.DocumentController
- DocumentServer.DocumentController.FieldAdapterCollection
- DocumentServer.Fields.DateField
- DocumentServer.Fields.FieldAdapter
- DocumentServer.Fields.FormCheckBox
- DocumentServer.Fields.FormDropDown
- DocumentServer.Fields.FormFieldAdapter
- DocumentServer.Fields.FormText
- DocumentServer.Fields.IfField
- DocumentServer.Fields.IncludeText
- DocumentServer.Fields.MailMergeFieldAdapter
- DocumentServer.Fields.MergeField
- DocumentServer.MailMerge.FieldMergedEventArgs
- DocumentServer.MailMerge.IncludeTextMergingEventArgs
- FontSettings
- Paragraph
- ParagraphCollection
Members by Class
Next Steps
- Version 15.1: the features of the next version.
- Version 14.0: sections, DOCX, MS Word fields, the Page Setup dialog box and the first MailMerge component.
- PDF/A: create archivable PDF documents today.