Table of Contents

Enum ParagraphTextDirection

Namespace
LMKit.Document.Layout
Assembly
LM-Kit.NET.dll

Coarse paragraph flow direction inferred from dominant text angle.

public enum ParagraphTextDirection

Fields

Unknown = 0

Indicates that the value is unknown or has not been specified.

Horizontal = 1

Baseline ~ 0°.

HorizontalUpsideDown = 2

Baseline ~ 180° (upside-down text).

TopToBottom = 3

Baseline ~ 90° (vertical, top to bottom).

BottomToTop = 4

Baseline ~ 270° (vertical, bottom to top).

Examples

Example: Check text direction for each paragraph on a page.

using LMKit.Document.Layout;
using LMKit.Document.Pdf;

PdfInfo info = PdfInfo.Load("multilingual.pdf"); PageElement page = info.Pages[0].GetLayout();

foreach (ParagraphElement para in page.DetectParagraphs()) { ParagraphTextDirection dir = para.TextDirection; Console.WriteLine($"Direction: {dir} => "{para.Text.Substring(0, Math.Min(40, para.Text.Length))}...""); }

Share