TX Text Control .NET Server

What's New in TX Text Control .NET Server 25.0

Topic

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

AreaWhat is new
ProtectionDocument permissions and passwords, editable regions per user
Headers and footersImages, text frames, barcodes and drawings anywhere on the page, such as watermarks
TablesPage break settings of paragraphs applied to table rows
Document EditorClient clipboard, chart ribbon tab, JavaScript API for fields, subtext parts and user dictionaries
.NET FrameworkCompiled 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, AllowPrinting and ReadOnly. In the editor, TextViewGenerator.DocumentPermissions returns them.
  • Activation. The restrictions take effect when the edit mode changes from Edit to ReadAndSelect. With the edit mode UsePassword, a dialog box asks for a password that protects the restrictions; the same password is needed to switch back to Edit.
  • 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.

Objects in Headers and Footers

While a header or footer is active, images, text frames, barcodes and drawings can be placed anywhere on the page. Such an object appears in the background of every page that shows the header or footer, which makes it suitable for watermarks and page backgrounds.

  • The object has to be positioned at a fixed position on the page: its InsertionMode, such as FrameBase.InsertionMode, must be FrameInsertionMode.FixedOnPage.
  • The height of the header or footer doesn't depend on the position of these objects.

See Watermarks and Headers and Footers.

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

.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 PermanentControlChar was extended with Pagination.
  • 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, getTextFields and getSubTextParts. 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

ObjectPropertiesMethods
ClipboardModeChangedEventArgsclipboardMode
ClipboardTransferAbortedEventArgsid
ClipboardTransferCompleteEventArgsid
ClipboardTransferProgressEventArgsid, progress
ClipboardTransferStartEventArgsid
DocumentPermissionsallowCopy, allowEditingFormFields, allowFormatting, allowFormattingStyles, allowPrinting, readOnly
Pointx, y
Rectanglelocation, size
RibbonPermissionsTaballowAdditionalUserNames, registeredUserNames
Sizeheight, width
TextPartaddTextField (obsolete), getSubTextParts (obsolete), getTextFields (obsolete)
TextViewLocationChangedEventArgslocation
TXTextControlclipboardMode, documentPermissions, images, ribbonPermissionsTab, textFrames, zoomFactor (obsolete)addMergeField, addTextField (obsolete), appendDocument, getSubTextParts (obsolete), getTextFields (obsolete), printDocument, removeTextField (obsolete), showMergeFieldDialog
ApplicationFieldparameters, typeNameshowDialog
Colora, b, g, r
DateFieldformat, preserveFormatting
IfFieldexpression1, expression2, falseText, operator, preserveFormatting, text, trueText
IncludeTextFieldbookmark, fileName, preserveFormatting, text, textFormat
MergeFielddateTimeFormat, name, numericFormat, preserveFormatting, text, textAfter, textBefore, textFormat
NextFieldpreserveFormatting
NextIfFieldexpression1, expression2, operator, preserveFormatting, text
ProofingaddWordToUserDictionary, getUserDictionaryInfo, loadUserDictionary, removeUserDictionary, removeWordFromUserDictionary, saveUserDictionary
TextFieldbounds (obsolete), containsInputPosition (obsolete), deleteable (obsolete), doubledInputPosition (obsolete), editable (obsolete), id (obsolete), isSpellCheckingEnabled (obsolete), length (obsolete), name (obsolete), showActivated (obsolete), start (obsolete), text (obsolete), type (obsolete)
UserDictionaryInfoisEditable, isGetSuggestionsEnabled, isSelectAsDefault, isSpellCheckingEnabled, language, length, name
ZoomFactorChangedEventArgszoomFactor

Next Steps