What's New in TX Text Control .NET Server 25.0
Protected documents with editable regions are the center of version 25.0: a document can forbid editing, formatting, printing or copying, while selected parts stay editable for named users. The version also allowed objects anywhere on a page from headers and footers, applied page break settings to table rows and let the Document Editor copy to the client's clipboard.
Version 25.0 was released on December 13, 2017, as TX Text Control X15, together with TX Text Control .NET for Windows Forms, TX Text Control .NET for WPF, TX Text Control ActiveX and TX Spell .NET 7.0. Its last full installer is dated November 21, 2018. The features below are the ones added since version 24.0.
Version 25.0 at a Glance
| Area | What is new |
|---|---|
| Protection | Document permissions and passwords, editable regions per user |
| Headers and footers | Images, text frames, barcodes and drawings anywhere on the page, such as watermarks |
| Tables | Page break settings of paragraphs applied to table rows |
| Document Editor | Client clipboard, chart ribbon tab, JavaScript API for fields, subtext parts and user dictionaries |
| .NET Framework | Compiled with .NET Framework 4.0 |
Documents With Restricted Access
A document can restrict what users may do with it: edit it, format it, print it or copy its content to the clipboard. See Document Protection for the .NET API and Document Protection for the Document Editor.
- Permissions. A DocumentPermissions object holds the restrictions:
AllowCopy,AllowFormatting,AllowFormattingStyles,AllowPrintingand ReadOnly. In the editor, TextViewGenerator.DocumentPermissions returns them. - Activation. The restrictions take effect when the edit mode changes from
EdittoReadAndSelect. With the edit modeUsePassword, a dialog box asks for a password that protects the restrictions; the same password is needed to switch back toEdit. - In the document. The permissions and the password are saved in the document in encrypted form. A password-protected document opens read-only. The supported formats are RTF, DOC, DOCX, PDF and the TX Text Control format.
Editable Regions
An editable region is a piece of text that stays editable when the document is read-only.
- Defining a region. An EditableRegion is defined by a start position and a length or by a selection. Regions may overlap. ServerTextControl.EditableRegions returns the EditableRegionCollection of the main text, which adds and removes regions; headers, footers and text frames have their own.
- Users. EditableRegion.UserName names the user who may edit the region; an empty string means everyone. The list of users who have access to the document is set with a
UserNamesproperty, such as TextViewGenerator.UserNames. - Highlighting. Regions are highlighted in a color that depends on the user name. EditableRegion.HighlightColor sets another color.
- Events. EditableRegionCreated and EditableRegionDeleted occur on
ServerTextControl, and EditableRegionEntered andEditableRegionLeftin the editor. - What is possible where. In a protected document, editing and formatting depend on the input position. TextViewGenerator.CanEdit and the properties
CanCharacterFormat,CanParagraphFormat,CanTableFormat,CanStyleFormat,CanDocumentFormatandCanPrinttell what is currently allowed, so that an application can enable or disable its buttons. - User interface. The Document Editor has a ribbon tab for permissions and editable regions, returned by TXTextControl.ribbonPermissionsTab in the JavaScript API.
Pagination in Tables
The paragraph settings "keep with next" (ParagraphFormat.KeepWithNext) and "page break before" (ParagraphFormat.PageBreakBefore) control automatic page breaks, and since version 25.0 they work in tables as well. A table row can contain several paragraphs, so one of them decides for the whole row:
- The first paragraph of a row decides. The pagination settings of all other paragraphs in the row are ignored.
- Page break before. If the first paragraph of a row has this setting, the complete row moves to a new page.
- Keep with next. If the first paragraph of a row has this setting, the row stays on the same page as the row that follows it.
The new value Pagination of the PermanentControlChar enumeration shows a dot in front of the first line of a paragraph that has one of these settings. Tables describes tables in the .NET API.
Selecting Objects in the Background
TextViewGenerator.SelectObjects decides what a mouse click in the editor selects when an object lies behind the text. With true, the click selects the object in the background; with false, it selects the text in front of it. See Images.
Document Editor
- Clipboard. Content can be copied from the editor to the clipboard of the client in HTML format. Users choose the client or the server clipboard with a button on the Home tab, and TXTextControl.clipboardMode sets it in the JavaScript API. Events report the progress of a transfer from the server to the client. See Editing Text.
- Charts. A new ribbon tab designs charts, and a new group on the frame formatting tab sets the layout of a chart frame.
- JavaScript API. Text fields, application fields such as merge fields, IF fields and date fields, and subtext parts can be read and changed. The Proofing object loads, saves and removes user dictionaries and adds words to them, for example with loadUserDictionary. TXTextControl.documentPermissions returns the permissions, and events report changes of the zoom factor and of the location of the text view.
Other API Additions
- ServerTextControl.SelectWord selects a word, and ContentsReset, SubTextPartCreated and
SubTextPartDeletedare new events ofServerTextControl. - FrameBase.Bounds returns the bounding rectangle of a frame, relative to the upper left corner of the document.
- The editor raises ShowDialogBox and events when a frame is moved or sized.
.NET Framework
TX Text Control 25.0 was compiled with .NET Framework 4.0. ASP.NET on .NET Framework describes the .NET Framework applications of today's version.
Upgrade to Version 25.0
- Update notes. PageCollection.GetItem received an overload that returns the page at a text input position, and
PermanentControlCharwas extended withPagination. - JavaScript methods marked obsolete. Several methods of the Document Editor's JavaScript API that version 25.0 added are marked obsolete in the current reference, among them
TXTextControl.addTextField,getTextFieldsandgetSubTextParts. The list below marks them. - Breaking changes. No change of version 25.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 25.0 lists for TX Text Control .NET Server. .NET names are relative to the TXTextControl namespace. Each name links to its current reference page, and "(obsolete)" marks the members that are obsolete today.
New Classes
.NET Members by Class
Document Editor JavaScript API
Next Steps
- Version 26.0: the features of the next version.
- Version 24.0: the features of the previous version.
- Older Versions: all versions from 29.0 back to 10.1.
- TX Text Control X15 and TX Spell .NET 7.0 Released: the release announcement on the Text Control Blog.