Detect lines in PDF with PDF extractor SDK is simple to apply in C# if you use these source codes below. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to detect lines in PDF with PDF extractor SDK with C#.
These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Data Extraction Suite. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. If you want to use these C# sample examples in one or many applications then they can be used easily.
The trial version of ByteScout Data Extraction Suite can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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(); } } }
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: