TX Text Control .NET Server

Deprecated APIs

Topic

Code written for an older version of TX Text Control .NET Server can still call members that the reference now marks obsolete. They are still part of the API, but Text Control will remove them in a future version, so replace them before an upgrade or whenever you work on the code that uses them. For each obsolete member, the tables below give the member that takes over its job.

What Obsolete Means

  • Still available. An obsolete member is still in the API and in the reference. Its reference page says that it will be removed "in one of the next versions" or "in a future version". No source names the version.
  • Marked in the reference. The description of an obsolete member starts with "Obsolete", or its title ends with "(Obsolete)".
  • Not for new code. Use the replacement in new code, and change existing code when you work on it. The reference of ListFormat.CharAfterNumber, for example, says that the property is only available for compatibility and that a new application should use its replacement.
  • Nothing removed since 30.0. The Update Notes of versions 30.0 to 34.0 list no member of TX Text Control .NET Server that has been removed. The overloads removed in 33.0 belong to the barcode control of the Windows Forms and WPF products. Breaking Changes lists the changes of each version that can require work.

.NET API

ObsoleteUse insteadObsolete since
ListFormat.CharAfterNumberListFormat.TextAfterNumber15.0
ListFormat.CharBeforeNumberListFormat.TextBeforeNumber15.0
The values CharAfterNumber and CharBeforeNumber of ListFormat.AttributeThe values TextAfterNumber and TextBeforeNumberNot stated
TextField.ShowActivatedTextField.HighlightMode and TextField.HighlightColorNot stated
The value GenerateXML of PDFImportSettingsThe value LoadEmbeddedDataNot stated
MailMerge.MergeBlocksMailMerge.Merge20.0

What changes with each replacement:

  • Numbered lists. CharAfterNumber and CharBeforeNumber hold a single character behind or in front of the number of a list item. TextAfterNumber and TextBeforeNumber hold a string, so the text around the number can be longer than one character. Paragraphs shows how lists are formatted.
  • Highlighted text fields. ShowActivated turned the background of a text field gray while the input position was in the field. HighlightMode sets when a field is highlighted: Activated highlights it while it contains the input position and the control has the input focus, Always at all times and Never not at all. HighlightColor sets the color of the highlight.
  • PDF import. PDFImportSettings values are passed with LoadSettings.PDFImportSettings when a PDF document is loaded. With LoadEmbeddedData, LoadSettings.EmbeddedData provides the metadata, the form fields and the text coordinates of the document after loading. Text Extraction and Document Metadata use it.
  • Merge blocks. Since version 20.0, every overload of Merge processes data relations: you put the related tables in a System.Data.DataSet, add the relations and pass the master System.Data.DataTable to Merge, which fills each merge block from the related table of the same name. MergeBlocks needed an additional merge block around the whole document for the same result. The reference page of MergeBlocks doesn't mark it obsolete; the What's New documentation of version 20.0 does. Merge Blocks explains the blocks and their data, and Data Sources shows the DataSet.

Document Editor JavaScript API

Version 28.0 gave the Document Editor a JavaScript API in which properties are get and set methods that take callback functions, and in which elements such as text fields are reached through collections of their own. Most obsolete members of the JavaScript API belong to the older API. JavaScript API explains the callback model.

Replacements Named in the Reference

The reference says that setFileDirectory has been removed for security reasons: the directory is set on the server, not in the browser.

Members of the TXTextControl Object

For the following members, the reference names no replacement. The right column lists the members that the reference describes for the same task.

textFields and subTextParts are properties of FormattedText, the object TXTextControl is derived from. Fields and Subtext Parts show the collections at work.

TextPart and the Old TextField Object

Every member of the TextPart object is obsolete, and so is every property of the text field object TXTextControl.TextField, introduced in version 25.0. The reference names no replacement. The current API has these members for the same tasks:

ObsoleteIn the current API
TextPart.typeFormattedText.textPartType
TextPart.addSubTextPartSubTextPartCollection.add
TextPart.removeSubTextPartSubTextPartCollection.remove
TextPart.getSubTextPartsThe collection subTextParts
TextPart.addTextFieldTextFieldCollection.add
TextPart.getTextFieldsThe collection textFields
TextPart.index and TextPart.selectionNone
The properties of TXTextControl.TextField, such as name, text and editableThe get and set methods of the same name of the TextField object, such as getName and setName
TXTextControl.TextField.showActivatedTextField.setHighlightMode and TextField.setHighlightColor
TXTextControl.TextField.typeNone: text fields and application fields have separate collections

Selection and Images

Status Bar

Since version 33.0, the status bar of the Document Editor has no frame, no gradients and no border style. The members that set them are obsolete and have no replacement:

The separators have no gradients anymore either. setSeparatorColor, new in 33.0, and resetSeparatorColor set and reset their color, and the get, set and reset methods of the dark and the light separator color, such as setSeparatorColorDark, are obsolete. Viewing and Printing describes what the status bar shows.

Document Viewer

ObsoleteUse insteadObsolete since
PDFJSSettings.BasePathLibrarySourcePath and WorkerSourcePathDocument Viewer 32.2.1
SignatureSettings.SignatureBoxNameSignatureSettings.SignatureBoxes, with the field name in SignatureBox.NameNot stated
PDFJSSettings.basePath of the JavaScript APIlibrarySourcePath and workerSourcePathDocument Viewer 32.2.1
SignatureSettings.signatureBoxName of the JavaScript APIsignatureBoxes, with the field name in SignatureBox.nameNot stated
  • PDF.js paths. The Document Viewer can display PDF documents with PDF.js, the PDF renderer of Mozilla, as Loading Documents describes. Since version 32.2.1, it supports PDF.js 4.0 and later, which is configured with the path of the library and the path of its worker instead of a base path. Breaking Changes in the Upgrade Guide shows the old and the new settings for ASP.NET Core, Angular and React.
  • Signature boxes. SignatureBoxName named one signature field of the document as the place where the user signs. SignatureBoxes takes a collection of signature boxes, each naming a signature field, and a name set in a SignatureBox overrides SignatureBoxName. Digital Signatures shows the settings.