ByteScout PDF Extractor SDK - C# - Detect Lines in PDF - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

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(); } } }

ON-PREMISE OFFLINE SDK

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

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

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

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next