TX Text Control .NET for WPF

What's New in TX Text Control .NET for WPF 29.0

Topic

Tables of contents, files embedded in PDF documents and the DocumentSettings class arrived in TX Text Control .NET for WPF with version 29.0, each with a user interface: the References ribbon tab, a table of contents dialog box and a sidebar for the document settings. The version also made barcodes part of TX Text Control and added a namespace that reads AcroForm fields and searches the text of PDF documents.

Version 29.0 was released on December 2, 2020, as TX Text Control X19, together with TX Text Control .NET Server, TX Text Control .NET for Windows Forms, TX Text Control ActiveX and TX Spell .NET 8.0. Its last full installer, that of Service Pack 3, is dated July 21, 2021. The features below are the ones added since version 28.0; the next version is Version 30.0.

Version 29.0 at a Glance

AreaWhat is new
Document structureTables of contents generated from structure levels, with a ribbon tab and a dialog box
Document settingsAuthor, title and other settings of the open document, with a sidebar to edit them
PDFEmbedded files, AcroForm import, text search in PDF documents
Mail mergeFilters and sorting instructions of existing merge blocks changed in code
BarcodesTX Barcode .NET integrated into TX Text Control, with the WPF control TXBarcodeControl
Subtext partsThe nested subtext parts and the text fields of a subtext part

Tables of Contents

A table of contents is generated from the structure level of the paragraphs in a document. Tables of Contents describes the feature as it is today.

PDF Documents

Version 29.0 extended both directions of the PDF support: files can be embedded when a PDF is saved, and a new namespace reads data out of existing PDF documents.

Document Settings

TextControl.DocumentSettings returns a DocumentSettings object with the general settings of the document the user works on: author, creation date, creator application, base path, keywords, subject, title, embedded files and user-defined properties. The values can be changed while the document is open. Save stores them with the document, and a property of SaveSettings with the same name overrides a value for one save. See Document Properties.

The Document Settings Sidebar

The Sidebar received a document settings layout, the value DocumentSettings of SidebarContentLayout, in which users manage the settings of the document:

  • Text boxes for the title, the author, the subject and the keywords. The creation date is set to the current date when the content of the TextControl is reset, and shows the document's creation date after a document is loaded.
  • Custom Properties lists the user-defined properties. Add... opens a dialog box for a new property, and Delete removes one.
  • Embedded Files in PDF lists the embedded files. They are filled only when LoadSettings.PDFImportSettings includes LoadEmbeddedFiles, and they are saved only with PDF documents. Add... chooses a file and determines its MIME type from the file extension, Edit... changes its MIME type, relationship and description, Save... stores it in a file and Remove deletes the entry.

A control of the layout that an application doesn't need can be hidden or removed: the DocumentSettingsItem enumeration names each item, and FrameworkElement.FindName returns it. Sidebar and Panels shows how.

Mail Merge

MailMerge creates documents from a template and data. Its repeating merge blocks, sections of the template that are repeated for each record, carry filter and sorting information since version 26.0, and version 29.0 made that information editable in code.

Sorting and Filtering describes filters and sorting instructions.

Subtext Parts

SubTextPart.GetChildren returns the subtext parts nested in a subtext part, and SubTextPart.GetTextFields the text fields it contains. See Subtext Parts.

Barcodes

The barcode component TX Barcode .NET became part of TX Text Control, so barcodes no longer need a separate product.

  • The WPF control. WPF.Barcode.TXBarcodeControl is a WPF element that displays a barcode. Its properties set the barcode type, the text, the colors, the alignment and the angle, and its methods check a text for the chosen type, save the barcode and save it as an image.
  • In a document. A barcode is a BarcodeFrame in a BarcodeCollection, returned by TextControl.Barcodes, and is positioned like an image or a text frame.
  • Check values. The new Barcode.BarcodeTypeSettings class sets whether a barcode has a check value and whether it shows it.

See Charts and Barcodes and Integrating WPF Barcodes and Drawings.

Upgrade to Version 29.0

  • Update notes. The update notes of version 29.0 list one entry: LoadSettings.PDFImportSettings was extended with the settings LoadEmbeddedFiles, LoadMetadata and GenerateXMLAsEmbeddedFile. Of the three, only LoadEmbeddedFiles is a value of the current PDFImportSettings enumeration. Today, the metadata, the form fields and the text coordinates of a PDF document come from LoadEmbeddedData and LoadSettings.EmbeddedData. The What's New documentation of version 30.0 repeats the same entry.
  • Breaking changes. No change of version 29.0 is known to break existing code. Breaking Changes starts with version 30.0.

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 29.0 lists for TX Text Control .NET for WPF. Names are relative to the TXTextControl namespace. Each name links to its current reference page.

New Classes

.NET Members by Class

ClassPropertiesMethodsEvents
Barcode.BarcodeTypeSettingsHasCheckValue, ShowCheckValue
DocumentLinkAutoGenerationType, DocumentTarget
DocumentServer.DataSources.MergeBlockInfoMergeFieldsApply
DocumentServer.PDF.AcroForms.FormCheckBoxIsChecked
DocumentServer.PDF.AcroForms.FormChoiceFieldCanEdit, CommitOnSelChange, DoNotSpellCheck, MultiSelect, Options, Sort, Value
DocumentServer.PDF.AcroForms.FormFieldAlternateFieldName, Bounds, FieldName, FieldType
DocumentServer.PDF.AcroForms.FormTextFieldValue
DocumentServer.PDF.Contents.ContentLineHeight, Page, Rectangle, Text, Width, X, Y
DocumentServer.PDF.Contents.LinesContentLinesFind
DocumentServer.PDF.FormsGetAcroFormFields
DocumentSettingsAuthor, CreationDate, CreatorApplication, DocumentBasePath, DocumentKeywords, DocumentSubject, DocumentTitle, EmbeddedFiles, UserDefinedDocumentProperties
DocumentTargetAutoGenerationType, Deleteable, ID, Name, Start, TargetNameScrollTo
EmbeddedFileCreationDate, Data, Description, FileName, LastModificationDate, MIMEType, Relationship
HeaderFooterTablesOfContents
IFormattedTextTablesOfContents
InputFormatStructureLevel
LoadSaveSettingsBaseEmbeddedFiles
LoadSettingsEmbeddedData
ParagraphFormatStructureLevel, TabLeaders
ServerTextControlDocumentSettings, TablesOfContentsOnTableOfContentsCreated, OnTableOfContentsDeletedTableOfContentsCreated, TableOfContentsDeleted
SubTextPartGetChildren, GetTextFields
TableOfContentsDefaultHighlightColor, HasLinks, HasPageNumbers, HasRightAlignedPageNumbers, HighlightColor, HighlightMode, ID, Length, MaximumStructureLevel, MinimumStructureLevel, Name, Number, Start, Text, TitleSave, ScrollTo, Update
TableOfContentsCollectionCount, IsSynchronized, Item, SyncRootAdd, CopyTo, GetEnumerator, GetItem, Remove
TableOfContentsEventArgsTableOfContents
TextFrameTablesOfContents
WPF.Barcode.TXBarcodeControlAdditionalText, Alignment, Angle, BackColor, BarcodeType, BarcodeTypeSettings, ForeColor, ShowText, Text, TextAlignment, UpperTextLengthGetDefaultText, GetMaximumTextLength, GetMinimumTextLength, IsTextValid, Load, PrintPaint, Save, SaveImage
WPF.TextControlDocumentSettings, RibbonReferencesTab, TablesOfContentsOnFormattingStyleChanged, OnTableOfContentsCreated, OnTableOfContentsDeleted, OnTableOfContentsEntered, OnTableOfContentsLeft, TableOfContentsDialogFormattingStyleChanged, TableOfContentsCreated, TableOfContentsDeleted, TableOfContentsEntered, TableOfContentsLeft

Next Steps