ByteScout Premium Suite - C# - Convert Protected PDF Document to XLS with PDF Extractor SDK - ByteScout

ByteScout Premium Suite – C# – Convert Protected PDF Document to XLS with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Convert Protected PDF Document to XLS with PDF Extractor SDK

How to convert protected PDF document to XLS with PDF extractor SDK in C# with ByteScout Premium Suite

If you want to learn more then this tutorial will show how to convert protected PDF document to XLS with PDF extractor SDK in C#

The sample source codes on this page shows how to convert protected PDF document to XLS with PDF extractor SDK in C#. ByteScout Premium Suite can convert protected PDF document to XLS with PDF extractor SDK. It can be applied from C#. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

The SDK samples given below describe how to quickly make your application do convert protected PDF document to XLS with PDF extractor SDK in C# with the help of ByteScout Premium Suite. Just copy and paste the code into your C# application’s code and follow the instructions. If you want to use these C# sample examples in one or many applications then they can be used easily.

ByteScout provides the free trial version of ByteScout Premium Suite along with the documentation and source code samples.

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.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"; } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next