ByteScout PDF Extractor SDK - C# - Detect Lines in PDF - ByteScout

ByteScout PDF Extractor SDK – C# – Detect Lines in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Detect Lines in PDF

How to detect lines in PDF in C# and ByteScout PDF Extractor SDK

This tutorial will show how to detect lines in PDF in C#

These sample source codes on this page below are demonstrating how to detect lines in PDF in C#. What is ByteScout PDF Extractor SDK? It is the SDK is designed to help developers with pdf tables and pdf data extraction from unstructured documents like pdf, tiff, scans, images, scanned and electronic forms. The library is powered by OCR, computer vision and AI to provide unique functionality like table detection, automatic table structure extraction, data restoration, data restructuring and reconstruction. Supports PDF, TIFF, PNG, JPG images as input and can output CSV, XML, JSON formatted data. Includes full set of utilities like pdf splitter, pdf merger, searchable pdf maker and other utilities. It can help you to detect lines in PDF in your C# application.

This rich sample source code in C# for ByteScout PDF Extractor SDK includes the number of functions and options you should do calling the API to detect lines in PDF. In your C# project or application you may simply copy & paste the code and then run your app! Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

ByteScout PDF Extractor SDK free trial version is available on our website. C# and other programming languages are supported.

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

Program.cs
      
using System; using Bytescout.PDFExtractor; namespace DetectLines { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.LineDetector instance LineDetector lineDetector = new LineDetector(); lineDetector.RegistrationName = "demo"; lineDetector.RegistrationKey = "demo"; // Load sample PDF document lineDetector.LoadDocumentFromFile(@".\sample2.pdf"); FoundLinesCollection foundLines = lineDetector.FindLines(1, LineOrientationsToFind.HorizontalAndVertical); Console.WriteLine("Number of lines found: " + foundLines.Count); for (int i = 0; i < foundLines.Count; i++) { FoundLine line = foundLines[i]; Console.WriteLine("Line # " + i); // Line Orientation Console.WriteLine("LineOrientation: " + line.LineOrientation); // Starting point of the line Console.WriteLine("From point: " + line.From); // Ending point of the line Console.WriteLine("To point: " + line.To); // Line width Console.WriteLine("Width: " + line.Width); } Console.ReadLine(); } } }

Try ByteScout PDF Extractor SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

VIDEO

ON-PREMISE VERSION INFORMATION

Get 60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Get ByteScout PDF Extractor SDK Free Training

WEB API

Get Your Free API Key

Explore Web API Documentation

Tutorials:

prev
next