Products Technologies Demo Docs Blog Support Company

Legal Documents: Combining Line Numbering, Form Fields and Document Protection

TX Text Control provides a sophisticated interface to create legal documents. Legal line numbering can be added dynamically to a document and combined with document permissions and form fields, it provides the perfect environment to create court filings and other legal documents.

Legal Documents: Combining Line Numbering, Form Fields and Document Protection

TX Text Control provides a sophisticated interface to create legal documents. Legal line numbering can be added dynamically to a document and combined with document permissions and form fields, it provides the perfect environment to create court filings and other legal documents.

Legal documents have very specific requirements when it comes to line numbering on left page margin, line spacing and visible double lines that divide the numbers from the body text. For example, California state courts require filings to use double line spacing, 12-point font size, and line numbers in the left margin.

Headers and Footers and Drawings

In order to insert the line numbers, a TextFrame is inserted into a header and positioned FixedOnPage and AboveTheText using the TextFrameInsertionMode. This way, the TextFrame is part of the header and is repeated on each page and overlaps the main text in the left page margin area.

Legal Line Numbering

The extension method in this sample calculates the position of the TextFrame based on the available page height and margins, the used font size and header text distances. Additionally, two vertical lines are added using the integrated TX Text Control Shapes.

The extension class also provides a method to insert a legal style with a fixed font and double (exact) line spacing.

Legal Line Numbering

Using the Extension Method

The extension methods can be easily used by adding the file LegalPageNumbering.cs to your application and by including the extension TXTextControl.LegalExtensions.

The first extension method AddLegalStyles is adding two new ParagraphStyle objects: One for the main text and one for the line numbering that is inherited from the main style.

(extension) void TextControl.AddLegalStyles(
  string styleName,
  [string fontName = "Courier New"],
  [int fontSize = 240],
  [Color? foreColor = null],
  [int lineSpacing = 200])

The second method AddLegalLineNumbering inserts the actual TextFrame and the optional double line drawings to the header of the document.

(extension) void TextControl.AddLegalLineNumbering(
  string paragraphStyle,
  [int textDistance = 100],
  [bool doubleLines = true])

In your application, a typical call of the extension methods would look similar to this:

// set the line width to 30 twips and line color to blue
LegalExtensions.LineWidth = 30;
LegalExtensions.LineColor = Color.Blue;

// insert a default style
textControl1.AddLegalStyles("CourtFilings");

// add the numbering with lines using the default style
// and a distance of 200 twips  to the text
textControl1.AddLegalLineNumbering(LegalExtensions.StyleName, 200, true);

Live Demo

In a live demo, we combined the line numbering and other helpful features for legal document processing applications. The document contains line numbers in the left margin, form fields and editable regions. The complete document is protected, so that users can only fill out form fields and modify the body text of the document:

Legal Line Numbering

Live Demo

See how line numbering, form fields and protected documents can be combined to provide a sophisticated UI to create legal documents.

Live Demo

Download the extension class as part of the sample application from our GitHub repository.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

GitHub

Download and Fork This Sample on GitHub

We proudly host our sample code on github.com/TextControl.

Please fork and contribute.

Download ZIP

Open on GitHub

Open in Visual Studio

Requirements for this sample

  • TX Text Control .NET for Windows Forms 30.0
  • Visual Studio 2019 or better

Related Posts

ASP.NETWindows FormsWPF

TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 3 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ASP.NETWindows FormsWPF

TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version

TX Text Control 33.0 Service Pack 2 is now available, offering important updates and bug fixes for all platforms. If you use TX Text Control in your document processing applications, this service…


ASP.NETWindows FormsWPF

Document Lifecycle Optimization: Leveraging TX Text Control's Internal Format

Maintaining the integrity and functionality of documents throughout their lifecycle is paramount. TX Text Control provides a robust ecosystem that focuses on preserving documents in their internal…


ActiveXASP.NETWindows Forms

Expert Implementation Services for Legacy System Modernization

We are happy to officially announce our partnership with Quality Bytes, a specialized integration company with extensive experience in modernizing legacy systems with TX Text Control technologies.


ActiveXASP.NETWindows Forms

Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5

TX Text Control 33.0 Service Pack 1 and TX Text Control 32.0 Service Pack 5 have been released, providing important updates and bug fixes across platforms. These service packs improve the…