Enum ParagraphTextDirection
Coarse paragraph flow direction inferred from dominant text angle.
public enum ParagraphTextDirection
Fields
Unknown = 0Indicates that the value is unknown or has not been specified.
Horizontal = 1Baseline ~ 0°.
HorizontalUpsideDown = 2Baseline ~ 180° (upside-down text).
TopToBottom = 3Baseline ~ 90° (vertical, top to bottom).
BottomToTop = 4Baseline ~ 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))}..."");
}