On this page you will learn from code samples for programming in C#.Writing of the code to convert protected PDF document to XLS in C# can be done by developers of any level using ByteScout PDF Extractor SDK. ByteScout PDF Extractor SDK: 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 convert protected PDF document to XLS in C#.
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 convert protected PDF document to XLS. In your C# project or application you may simply copy & paste the code and then run your app! This basic programming language sample code for C# will do the whole work for you to convert protected PDF document to XLS.
Download free trial version of ByteScout PDF Extractor SDK from our website with this and other source code samples for C#.
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.IO; using Bytescout.PDFExtractor; using System.Diagnostics; namespace PDF2XLS { // // This example demonstrates how to provide password for protected PDF files. // class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.XLSExtractor instance XLSExtractor extractor = new XLSExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; File.Delete("output.xls"); // Document Password Can be set in two ways // 1. Using Property // 2. Using Events // 1. Handle document password using Property // extractor.Password = "password" // 2. Handle document password using Event extractor.PasswordRequired += new System.EventHandler(extractor_PasswordRequired); // Load sample PDF document extractor.LoadDocumentFromFile(@".\encrypted (password is 'password').pdf"); // Set the output format to XLS extractor.OutputFormat = SpreadseetOutputFormat.XLS; // Save the spreadsheet to file extractor.SaveToXLSFile("output.xls"); // Cleanup extractor.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("output.xls"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } static void extractor_PasswordRequired(object sender, System.EventArgs e) { // Ask user for password and put it to `Password` property. ((XLSExtractor) sender).Password = "password"; } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: