These source code samples are assembled by their programming language and functions they apply. 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. It can be applied to extract filled PDF form data with PDF extractor SDK using C#.
This prolific sample source code in C# for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to extract filled PDF form data with PDF extractor SDK. Just copy and paste the code into your C# application’s code and follow the instructions. This basic programming language sample code for C# will do the whole work for you to extract filled PDF form data with PDF extractor SDK.
Trial version of ByteScout Data Extraction Suite is available for free. Source code samples are included to help you with your C# app.
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 System.Diagnostics; using System.Xml; using Bytescout.PDFExtractor; namespace ExtractFilledFormData { static class Program { static void Main() { // Create XMLExtractor instance XMLExtractor extractor = new XMLExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile(@".\filled_form.pdf"); // Get PDF document text as XML string xmlText = extractor.GetXML(); // Load XML XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(xmlText); // Select all "control" nodes XmlNodeList formControls = xmlDocument.SelectNodes("//control"); if (formControls != null) { foreach (XmlNode formControl in formControls) { XmlAttribute typeAttribute = formControl.Attributes["type"]; // Show filled textboxes if (typeAttribute.Value == "editbox") { if (!String.IsNullOrEmpty(formControl.InnerText)) Console.WriteLine("EDITBOX " + formControl.Attributes["id"].Value + ": " + formControl.InnerText); } // Show checked checkboxes else if (typeAttribute.Value == "checkbox") { if (formControl.Attributes["state"].Value == "1") Console.WriteLine("CHECKBOX " + formControl.Attributes["id"].Value + ": " + formControl.Attributes["state"].Value); } } } // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } } }
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: