Products Technologies Demo Docs Blog Support Company

Inserting and Printing Folding Marks Using TX Text Control

Folding marks are often used on letterhead paper to indicate where to fold a letter to fit into standard envelopes. Using TX Text Control, such folding marks can be added using paragraph frames inserted into perfectly positioned text frames. Below is a screenshot of a typical letterhead paper with folding marks. Text frames can be positioned outside the text area on page margins and are printed and exported to PDF as well, if they are positioned 'fixed' on a page or anchored to a paragraph.…

Inserting and Printing Folding Marks Using TX Text Control

Folding marks are often used on letterhead paper to indicate where to fold a letter to fit into standard envelopes. Using TX Text Control, such folding marks can be added using paragraph frames inserted into perfectly positioned text frames.

Below is a screenshot of a typical letterhead paper with folding marks.

Inserting and printing folding marks using TX Text Control

Text frames can be positioned outside the text area on page margins and are printed and exported to PDF as well, if they are positioned 'fixed' on a page or anchored to a paragraph.

Inserting and printing folding marks using TX Text Control

If you want to render those marks only in case the document is printed, you can insert them programmatically on each page using the following code:

foreach (TXTextControl.Page page in textControl1.GetPages())
{
    TXTextControl.TextFrame markFrame =
        new TXTextControl.TextFrame(new Size(500, 1000));

    markFrame.InternalMargins = new int[] { 0,0,0,0 };
    markFrame.BorderWidth = 0;
    markFrame.Moveable = false;
    markFrame.Sizeable = false;

    textControl1.TextFrames.Add(
        markFrame,
        page.Number, 
        new Point(400, 5100), 
        TXTextControl.TextFrameInsertionMode.FixedOnPage |
            TXTextControl.TextFrameInsertionMode.BelowTheText);

    markFrame.Selection.ParagraphFormat.Frame = TXTextControl.Frame.TopLine;
}

You can download the sample document and load it into the shipped sample TX Text Control Words to see how the folding marks are inserted.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

Windows FormsGetting StartedTutorial

Windows Forms Tutorial: Create Your First Windows Forms C# Application

This tutorial shows how to create your first Windows Forms application with C# using TX Text Control .NET for Windows Forms in Visual Studio 2022.


ASP.NETASP.NET CoreMailMerge

How to Mail Merge MS Word DOCX Documents in ASP.NET Core C#

Mail merge is the process of merging data, such as Json or IEnumerable objects, into a template document, such as a DOC or DOCX file. This tutorial is a walkthrough of the steps necessary to…


AngularDocument EditorNode.js

Creating an Angular Document Editor Application with a Node.js WebSocket Server

This tutorial shows how to create an Angular application that uses the Document Editor with a Node.js WebSocket server.


ASP.NETASP.NET CoreMailMerge

Adding SVG Watermarks to Documents

This article shows how to add SVG images to document section headers that repeat automatically on each page. This watermark will be inserted vertically and horizontally centered on each section page.


ASP.NETASP.NET CoreMailMerge

Using MailMerge in ASP.NET Core 6 Web Applications

This article shows how to use the TX Text Control ASP.NET MailMerge class to merge templates with JSON data within a .NET 6 application in Visual Studio 2022.