TX Text Control 29.0 provides the following new features:
Per-Monitor DPI Awareness
Starting with Windows 10 Creators Update (1703) the application's view depends on the DPI of the display that its main window is primarily located on. In Windows Forms a TextControl supports now multiple-monitor setups where each display has a different scale factor and the application is moved from one display to another. In this case a TextControl and all of its user-interface toolbars and ribbons change their DPI scaling factor dynamically. This is also done when making a display-scale-factor change while the application is running. In the .net framework (starting with version 4.7) enhanced high DPI support is an opt-in feature. It must be configured in your application's app.config file to take advantage of it. See the TXTextControlWords sample programs for a configuration file example.
Using a Table of Contents
A table of contents can be automatically generated from the structure levels defined for each paragraph in the document. The dialogbox for setting paragraph attributes has been enhenced to specify a structure level. Furthermore, the new ParagraphFormat.StructureLevel property defines the level of a paragraph, possible values are 0 to 10. A structure level of 0 means, that the paragraph belongs to the body of the document. A level can be specified for each paragraph in the document, but it is more common to define it as an attribute of a ParagraphStyle. To add a new table of contents to the document, the TextControl.TableOfContentsDialog method can be used which offers the end-user a dialgbox for setting all necessary parameters. To do the same thing through programming code, a TableOfContents object must be created and added to the TableOfContentsCollection with its Add method. The document then is searched for all paragraphs with the specified structure levels, generates the table of contents with or without page numbers and adds it at the current text input position. The table of contents is formatted with font and paragraph attributes found in the contained paragraphs. Furthermore, for each level a formatting style is generated so that the end-user can alter these attributes in a simple way. The automatically created styles are named TOC_Title, TOC_Level1, TOC_Level2, .... The TableOfContents object defines the properties of a table of contents, the most important being the minimum and maximum structure level of the paragraphs it should contain. Further attributes are a title, a highlight color and a mode with which to highlight the table of contents. A document can contain multiple tables of contents consisting of paragraphs with different levels. All tables of contents in a document are available through a TableOfContentsCollection object. Automatic link generation is also possible. In this case each entry in the table of contents is defined as a DocumentLink with a corresponding DocumentTarget. When the end-user clicks an entry in the table of contents while pressing the CTRL-key, the document scrolls to the corresponding page in the document. Events occur, when a table of contents is created (TableOfContentsCreated), deleted (TableOfContentsDeleted), entered (TableOfContentsEntered) or left (TableOfContentsLeft).
Embedded Files in PDF Documents
The new SaveSettings.EmbeddedFiles and LoadSettings.EmbeddedFiles properties provide an interface to save embedded files in PDF documents and to get such embedded data out of PDF documents. An EmbeddedFile object encapsulates a file and its data and provides additional optional properties which can be saved in the PDF document. When a document is loaded, the LoadEmbeddedFiles setting must be specified through the LoadSettings.PDFImportSettings property.
The new methods SubTextPart.GetChildren and SubTextPart.GetTextFields can be used to get further information about a certain SubTextPart.
The new DocumentSettings class provides properties to access general document settings, such as author and title, contained in the document the user is currently working on. A DocumentSettings object is provided through the TextControl.DocumentSettings and WPF.TextControl.DocumentSettings properties. The object's values can be changed while a user is working on the document. When such a document is saved with one of the Save methods, all settings are automatically stored but, can be overwritten through the corresponding property of the SaveSettings class. Additionally the new sidebar's DocumentSettings layout provides a user interface to manage the document settings DocumentTitle, Author, CreationDate, DocumentSubject, DocumentKeywords, UserDefinedDocumentProperties and EmbeddedFiles. The properties DocumentTitle, Author, DocumentSubject and DocumentKeywords can be edited by using the corresponding text box. CreationDate is automatically set to the current date when the content of the TextControl is reset . If a document is loaded, the displayed date represents the document's creation date. The values of the UserDefinedDocumentProperties property are listed under the category Custom Properties. New custom properties are defined by using the Add Custom Property dialog that can be opened by clicking the Add... button. To remove a custom property, use the Delete button. Values of the EmbeddedFiles property are listed under the category Embedded Files in PDF. These values are PDF specific and can only be loaded, if the LoadSettings.PDFImportSettings property value includes the enumeration PDFImportSettings.GenerateTextFrames | PDFImportSettings.LoadEmbeddedFiles. When saving a document, embedded files are only stored in documents of type PDF. To add a new embedded file, the user can show an open file dialog by clicking the Add... property. When choosing such a file, the sidebar automatically determines a file extension specific MIME type. The embedded file's MIME type, relationship and description can be modified by using the Edit Embedded File dialog that can be shown by clicking the Edit... button. To save an embedded file, a save file dialog is opend when clicking the Save... button. To delete an entry, the Remove button can be used. If the loaded PDF contains metadata, this data can be accessed by extending the LoadSettings.PDFImportSettings property value with the PDFImportSettings.LoadMetadata enumeration. In this case the Show Metadata... button is displayed to open a dialog that shows the mata data as text. If some controls of the sidebar are not required, these controls can be hidden or removed by accessing them with the FindItem method. For example: To disable showing the Embedded Files in PDF category at a vertical TXTextControl.Windows.Forms.Sidebar, only sidebar.FindItem(Sidebar.DocumentSettingsItem.TXITEM_EmbeddedFilesPanel).Visible = false; must be set.
Filtering and Sorting Repeating Merge Blocks
It is now possible to programmatically change filter and sorting information stored alongside SubTextPart based repeating mail merge blocks. For this purpose the MergeBlockInfo class has been extended by an additional constructor which makes it possible to create a MergeBlockInfo instance based on an existing merge block. Once created in this manner, the MergeBlockInfo instance contains all information about filters and sorting instructions, contained merge fields, child blocks and the name of the data table the block is based on. This information can be edited freely and stored back into the document.
With the integration of the barcode component TX Barcode .NET, TX Text Control enables developers to integrate barcodes into .NET-based applications without including an additional framework. The TXTextControl.Barcode.TXBarcodeControl is a powerful component to create barcodes in a very efficient way. It can be completely integrated into a document with a DataVisualization.BarcodeCollection through an object of the type DataVisualization.BarcodeFrame. These barcode objects can be positioned and used like any other object, such as images or text frames.
HTML5 Document Editor