What's New in TX Text Control 14.0
Version 14.0 is where several parts of today's TX Text Control began: document sections, the DOCX format, MS Word fields as ApplicationField objects and the MailMerge class. It also appended documents to each other, described the pages of a document and ran on 64-bit systems.
Version 14.0 was released in January 2008 for the server and the client products, as the press release Press Release: TX Text Control 14.0 is Released announced. TX Text Control .NET for WPF didn't exist yet: its first version was Version 16.0, and the classes below belong to the class library that it shares with the Windows Forms edition. Features of the Windows Forms control, such as the Page Setup dialog box and the section display in the status bar, aren't listed here.
Version 14.0 at a Glance
| Area | What is new |
|---|---|
| Platform | A 64-bit edition |
| Sections | Page size, margins and headers and footers per section |
| DOCX | Loading and saving the WordprocessingML format |
| Fields | MS Word fields and Heiler HighEdit fields as ApplicationField objects |
| Mail merge | The DocumentServer.MailMerge class |
| Documents and pages | Appending documents, page coordinates, a formatting printer, background printing |
Platform
TX Text Control is available as a 64-bit edition. All kernel and filter DLLs support 64-bit memory addresses and have the same file names in both editions, and the class library is platform independent.
DOCX and Fields
- DOCX. TX Text Control loads and saves the WordprocessingML part of the Office Open XML format, the ZIP-compressed XML format of MS Word, in files with the extension .docx and in memory. The StreamType and BinaryStreamType value
WordprocessingMLselects it. See Supported File Formats. - MS Word fields. Fields of MS Word and RTF documents are imported and exported as ApplicationField objects with the ApplicationFieldFormat
MSWord. The class gives access to the TypeName and the Parameters of a field; it doesn't carry out the field's logic. ServerTextControl.ApplicationFields lists all fields. Set LoadSettings.ApplicationFieldFormat toMSWordbefore loading, and select field types with LoadSettings.ApplicationFieldTypeNames. See Fields and Subtext Parts. - Heiler HighEdit fields. Fields of Heiler HighEdit in RTF documents are imported and exported as application fields with the
ApplicationFieldFormatvalueHighEdit, which gives their names.
Mail Merge
The DocumentServer.MailMerge class merges templates with data in .NET projects such as ASP.NET web applications, web services and Windows services. It uses a ServerTextControl, set with TextComponent, and fields of the type ApplicationField.
- Templates and results. LoadTemplate and LoadTemplateFromMemory load the template, and SaveDocument, SaveDocumentToMemory and Print output the merged documents in any
StreamTypeformat, as single documents or as one document. - Merging. Merge merges the data, and
MergeBlocksmerges repeating blocks, which Version 20.0 made obsolete. RemoveEmptyFields,trueby default, removes fields without data, and UseTemplateFormat,falseby default, applies the page size and margins of the template. - Events. DataRowMerged occurs for each merged data row and BlockRowMerged for each merged row of a block.
MailMerge introduces the class as it is today.
Documents and Pages
- Append documents. ServerTextControl.Append loads a document from a file, a byte array or a string and appends it to the end of the current document, optionally as a new paragraph or a new section.
- Page coordinates. ServerTextControl.GetPages returns a PageCollection. Because pages can have different sizes, each Page gives its Bounds and TextBounds, its first character and number of characters, its section and its NumberInSection.
- Formatting printer. ServerTextControl.FormattingPrinter names the printer the document is formatted for, so that the printed document has the dimensions of the formatted one. The formatting device can also be the display.
- Background printing. An application can add its own
PrintPageEventHandlerto aPrintDocumentto print images or watermarks on a page. The content of aServerTextControlis then printed transparently on top. See Printing.
Upgrade to Version 14.0
- HeaderFooterCollection.Style. The property was replaced with the properties
HeaderFooterActivationStyleandHeaderFooterFrameStyleof the Windows FormsTextControl. They set how a header or footer is activated and framed in the editor, whichServerTextControldoesn't show.
New Classes, Properties, Methods and Events
The classes and members below are the ones that the What's New documentation of version 14.0 lists for TX Text Control .NET for WPF. 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
- ApplicationField
- ApplicationFieldCollection
- DocumentServer.MailMerge
- DocumentServer.MailMerge.BlockRowMergedEventArgs
- DocumentServer.MailMerge.DataRowMergedEventArgs
- Page
- PageCollection
- Section
- SectionCollection
- SectionFormat
Members by Class
Next Steps
- Version 15.0: the features of the next version.
- Version 13.0: paragraph flow, hyperlinks in PDF and the field collections.
- Sections, Pages, Headers, and Footers: divide documents into sections.