Deprecated APIs
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
| Obsolete | Use instead | Obsolete since |
|---|---|---|
| ListFormat.CharAfterNumber | ListFormat.TextAfterNumber | 15.0 |
| ListFormat.CharBeforeNumber | ListFormat.TextBeforeNumber | 15.0 |
The values CharAfterNumber and CharBeforeNumber of ListFormat.Attribute | The values TextAfterNumber and TextBeforeNumber | Not stated |
| TextField.ShowActivated | TextField.HighlightMode and TextField.HighlightColor | Not stated |
The value GenerateXML of PDFImportSettings | The value LoadEmbeddedData | Not stated |
| MailMerge.MergeBlocks | MailMerge.Merge | 20.0 |
What changes with each replacement:
- Numbered lists.
CharAfterNumberandCharBeforeNumberhold a single character behind or in front of the number of a list item.TextAfterNumberandTextBeforeNumberhold a string, so the text around the number can be longer than one character. Paragraphs shows how lists are formatted. - Highlighted text fields.
ShowActivatedturned the background of a text field gray while the input position was in the field.HighlightModesets when a field is highlighted:Activatedhighlights it while it contains the input position and the control has the input focus,Alwaysat all times andNevernot at all.HighlightColorsets the color of the highlight. - PDF import.
PDFImportSettingsvalues are passed with LoadSettings.PDFImportSettings when a PDF document is loaded. WithLoadEmbeddedData, 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
Mergeprocesses data relations: you put the related tables in aSystem.Data.DataSet, add the relations and pass the masterSystem.Data.DataTabletoMerge, which fills each merge block from the related table of the same name.MergeBlocksneeded an additional merge block around the whole document for the same result. The reference page ofMergeBlocksdoesn'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 theDataSet.
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
| Obsolete | Use instead |
|---|---|
| TXTextControl.isHyphenationEnabled | setIsHyphenationEnabled and getIsHyphenationEnabled |
| TXTextControl.isLanguageDetectionEnabled | setIsLanguageDetectionEnabled and getIsLanguageDetectionEnabled |
| TXTextControl.isSpellCheckingEnabled | setIsSpellCheckingEnabled and getIsSpellCheckingEnabled |
| TXTextControl.isTrackChangesEnabled | setIsTrackChangesEnabled and getIsTrackChangesEnabled |
The textControlChanged event of addEventListener | The changed event |
| TXTextControl.setFileDirectory | TextControl.SetFileDirectory of TXTextControl.Web.MVC, on the server |
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.
| Obsolete | In the current API |
|---|---|
| controlChars | getControlChars and setControlChars |
| editMode | getEditMode and setEditMode |
| zoomFactor | zoom |
| addTextField | TextFieldCollection.add, and ApplicationFieldCollection.add for application fields |
| getTextFields | The collection textFields |
| removeTextField | TextFieldCollection.remove |
| getSubTextParts | The collection subTextParts |
| getTextParts | The collection textParts |
| loadSelection | Selection.load |
| saveSelection | Selection.save |
| saveDocumentQuestionDialogEnabled | None |
| getFileDirectory | None |
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:
| Obsolete | In the current API |
|---|---|
| TextPart.type | FormattedText.textPartType |
| TextPart.addSubTextPart | SubTextPartCollection.add |
| TextPart.removeSubTextPart | SubTextPartCollection.remove |
| TextPart.getSubTextParts | The collection subTextParts |
| TextPart.addTextField | TextFieldCollection.add |
| TextPart.getTextFields | The collection textFields |
| TextPart.index and TextPart.selection | None |
The properties of TXTextControl.TextField, such as name, text and editable | The get and set methods of the same name of the TextField object, such as getName and setName |
| TXTextControl.TextField.showActivated | TextField.setHighlightMode and TextField.setHighlightColor |
| TXTextControl.TextField.type | None: text fields and application fields have separate collections |
Selection and Images
| Obsolete | In the current API |
|---|---|
| Selection.setBounds | Selection.setStart and Selection.setLength |
| ImageCollection.addAtFixedPosition | ImageCollection.addAtFixedPositionOnPage, or addAtFixedPositionInDocument for a position relative to the document |
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 enumeration StatusBarBorderStyle and the method StatusBarViewGenerator.setBorderStyle
- getFrameColor, setFrameColor and resetFrameColor of
StatusBarViewGeneratorColors - getGradientBackColor, setGradientBackColor and resetGradientBackColor
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
| Obsolete | Use instead | Obsolete since |
|---|---|---|
| PDFJSSettings.BasePath | LibrarySourcePath and WorkerSourcePath | Document Viewer 32.2.1 |
| SignatureSettings.SignatureBoxName | SignatureSettings.SignatureBoxes, with the field name in SignatureBox.Name | Not stated |
| PDFJSSettings.basePath of the JavaScript API | librarySourcePath and workerSourcePath | Document Viewer 32.2.1 |
| SignatureSettings.signatureBoxName of the JavaScript API | signatureBoxes, with the field name in SignatureBox.name | Not 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.
SignatureBoxNamenamed one signature field of the document as the place where the user signs.SignatureBoxestakes a collection of signature boxes, each naming a signature field, and a name set in aSignatureBoxoverridesSignatureBoxName. Digital Signatures shows the settings.