What's New in TX Text Control .NET for Windows Forms 33.0
For a Windows Forms project, version 33.0 is mainly a platform release: its NuGet package requires .NET 8 or higher, and Text Control prepared it for .NET 9 and the preview of .NET 10. The API gained classes that read the files embedded in a PDF document, classes that produce barcodes and drawings as SVG, and mail merge events that tell which subtext part a merged element belongs to.
Version 33.0 was released on March 12, 2025, together with TX Text Control .NET Server, TX Text Control .NET for WPF and TX Spell .NET 11.0. The current version is Version 34.0, and the service packs of 33.0 are listed on Service Packs.
Version 33.0 at a Glance
| Area | What is new |
|---|---|
| .NET | A package for .NET 8 and higher, support for .NET 9, tests with the preview of .NET 10 |
| Extracting the embedded files of a PDF document | |
| Barcodes and drawings | TXBarcodeCore and TXDrawingCore, which provide barcodes and shapes as SVG |
| Mail merge | Subtext part information in the arguments of five merge events |
.NET 8, .NET 9 and .NET 10
- .NET 8 and higher. The package
TXTextControl.TextControl.WinForms.SDKtargets .NET 8, so a project that uses it targets .NET 8 or higher. The 32.0 packages targeted .NET 5 and, from Service Pack 2, .NET 6. Text Control continues to provide assemblies for the .NET Framework 4.8 through the setup. - .NET 9. Version 33.0 supports Windows Forms applications on .NET 8 and .NET 9, created in Visual Studio 2022. Text Control names licensing and NuGet support among the parts adapted to .NET 9.
- .NET 10 preview. Text Control tested the Windows Forms version of 33.0 with the preview of .NET 10, including the design-time support in Visual Studio, the NuGet package, the toolbox and the smart tags. The blog article TX Text Control 33.0 Is Ready for .NET 10 Preview 2 describes the tests. Final support for .NET 10 came with Version 34.0.
.NET and .NET Framework lists the current requirements.
Windows Only
The release of version 33.0 brought TX Text Control .NET Server to Linux with a new engine. That engine is part of the .NET Server product and its license. The package of TX Text Control .NET for Windows Forms contains native libraries for 32-bit and 64-bit Windows only, and Windows Forms applications run on Windows, as before. Supported Platforms lists the platforms of the current version.
PDF Attachments
A PDF document can contain embedded files, for example the XML data of an electronic invoice. The new static class DocumentServer.PDF.Attachments extracts them without loading the PDF document into a TextControl or a ServerTextControl:
- GetFromFile returns the embedded files of a PDF file, and GetFromData those of a PDF document in a byte array.
- Each file is a DocumentServer.PDF.EmbeddedFile object with the file name, the description, the MIME type, the creation and modification dates and the data, as text or as binary data. For PDF/A documents, Relationship describes how the file relates to the document, for example
SourceorData.
Extract Attachments From a PDF shows how to write the attachments of a PDF file to a folder, and why an alias keeps the class apart from TXTextControl.EmbeddedFile.
Barcodes and Drawings
- TXBarcodeCore. Barcode.TXBarcodeCore specifies the type and format of a barcode and provides it as SVG. Call Create before you use the object. GetSVG returns the barcode as an SVG string. Load and Save read and write the barcode data, and ViewChanged occurs when a change of the barcode settings requires the barcode image to be updated. Its members fall into these groups:
- Type and text. BarcodeType selects the barcode type, BarcodeTypeSettings holds the settings of that type, Text is the encoded text and UpperTextLength the maximum number of its characters. GetDefaultText, GetMinimumTextLength, GetMaximumTextLength and IsTextValid return the default text, the length limits and whether a text is valid for a barcode type.
- Appearance. ForeColor, BackColor, Size, Alignment and Angle format the barcode image. ShowText shows the encoded text, AdditionalText adds a text, and TextAlignment places both below or above the image.
- TXDrawingCore. Drawing.TXDrawingCore specifies the type and format of shapes and renders them as SVG. It manages its Shapes, a selection, an undo buffer and the clipboard, and GetSVG returns the shapes as an SVG string. Its members fall into these groups:
- Canvas. BackColor, BorderColor, BorderWidth and Size format the canvas that holds the shapes, IsCanvasVisible tells whether it is visible, and SizeToContent adapts its bounds to the shapes.
- Shape data. Load and Save read and write the shapes from and to a stream.
- Selection and clipboard. Selection contains the selected shapes, SelectAll selects all of them, and Copy, Cut and Paste use the clipboard, with CanCopy and CanPaste telling whether they are possible.
- Undo. Undo and Redo take back and repeat operations, CanUndo and CanRedo tell whether they are possible, and ClearUndo empties the undo buffer.
- Events. Changed occurs when the number or the formatting of the shapes has changed, AdaptBounds when the canvas needs new bounds, and ViewChanged when a change of the selection has changed the view. ShapeCreated, ShapeSelected, ShapeDeselected, ShapeMoved, ShapeSized, ShapeFlipped and ShapeFormatChanged report what happened to a single shape.
Both classes have no user interface. The barcode control TXBarcodeControl of Windows Forms remains, and version 33.0 removed four of its overloads; see Upgrade to Version 33.0. Integrating Charts and Barcodes covers barcodes in an application.
Mail Merge
MailMerge raises events while it merges a template. A SubTextPart is a user-defined part of a document. In version 33.0, the arguments of five events tell which subtext part the merged element belongs to, with the properties SubTextPartID and SubTextPartNumber:
| Event arguments | The subtext part |
|---|---|
| BlockMergingEventArgs | That represents the merge block |
| BlockRowMergedEventArgs | That represents the merge block |
| FieldMergedEventArgs | That contains the field, or 0 |
| FormFieldMergedEventArgs | That contains the form field, or 0 |
| ImageMergedEventArgs | That contains the image, or 0 |
SubTextPartID is the ID of the subtext part, and SubTextPartNumber its one-based number. Merge Events covers the events, and Subtext Parts the parts themselves.
New Classes and Members
The What's New documentation of version 33.0 lists these classes, properties, methods and events as new in TX Text Control .NET for Windows Forms, grouped by class. Each name leads to its reference page.
- Barcode.TXBarcodeCore (new class): AdditionalText, Alignment, Angle, BackColor, BarcodeType, BarcodeTypeSettings, Create, ForeColor, GetDefaultText, GetMaximumTextLength, GetMinimumTextLength, GetSVG, IsTextValid, Load, Save, ShowText, Size, Text, TextAlignment, UpperTextLength, ViewChanged
- DocumentServer.MailMerge.BlockMergingEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.BlockRowMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.FieldMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.FormFieldMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.MailMerge.ImageMergedEventArgs: SubTextPartID, SubTextPartNumber
- DocumentServer.PDF.Attachments (new class): GetFromData, GetFromFile
- DocumentServer.PDF.EmbeddedFile (new class): BinaryData, CreationDate, Description, FileName, HasBinaryData, HasStringData, LastModificationDate, MimeType, Relationship, StringData
- Drawing.TXDrawingCore (new class): AdaptBounds, BackColor, BorderColor, BorderWidth, CanCopy, CanPaste, CanRedo, CanUndo, Changed, ClearUndo, Copy, Cut, GetSVG, IsCanvasVisible, Load, Paste, Redo, Save, SelectAll, Selection, ShapeCreated, ShapeDeselected, ShapeFlipped, ShapeFormatChanged, ShapeMoved, Shapes, ShapeSelected, ShapeSized, Size, SizeToContent, Undo, ViewChanged
Upgrade to Version 33.0
- Update notes. The overloads of TXBarcodeControl.Load and TXBarcodeControl.Save that take a
SerializationFormatwere removed. - Changes to plan for. The package requires .NET 8 or higher, and it contains TXSVGResources.dll instead of TXSVGGenerator.dll and native libraries with new names. The toolbox items are unchanged, in the tab TX Text Control 33.0. Breaking Changes in the Upgrade Guide describes each change.
- Upgrade steps. Upgrading from Previous Versions covers the move of a project from version 32.0.
Next Steps
- Version 34.0: the features of the next version.
- Version 32.0: the features of the previous version.
- Breaking Changes: the changes that can require work when you upgrade.
- The Wait is Over: TX Text Control for Linux is Officially Here: the release announcement on the Text Control Blog, which covers all products of version 33.0.