What's New in TX Text Control .NET for Windows Forms 14.0
Version 14.0 is where several parts of today's TX Text Control .NET for Windows Forms began: document sections with their own Page Setup dialog box, 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.
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, a Page Setup dialog box, sections in the status bar |
| 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. 32-bit and 64-bit Applications describes the platforms of the current version.
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 inTextControl.LoadandTextControl.Save. 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. TextControl.ApplicationFields lists all fields. Set LoadSettings.ApplicationFieldFormat toMSWordbefore loading, and select field types with LoadSettings.ApplicationFieldTypeNames. See Fields, Hyperlinks, and Bookmarks. - 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. TextControl.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.
ServerTextControlhas the same method. - Page coordinates. TextControl.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. See Sections, Pages, Headers, and Footers.
- Formatting printer. TextControl.FormattingPrinter names the printer the document is formatted for, so that the displayed and the printed document have the same dimensions. 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 aTextControlorServerTextControlis then printed transparently on top. See Printing and Print Preview. - Page background. TextControl.BackgroundStyle defines how the page background is shown in page view.
Upgrade to Version 14.0
- HeaderFooterCollection.Style. The property was replaced with TextControl.HeaderFooterActivationStyle and TextControl.HeaderFooterFrameStyle, which set how a header or footer is activated and framed in the editor.
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 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.
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: the vertical ruler bar, paragraph flow, hyperlinks in PDF and the field collections.
- Sections and Page Layout: divide documents into sections.