ByteScout PDF Suite - C# - Convert Protected PDF Document to XLS with PDF Extractor SDK - 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 Suite – C# – Convert Protected PDF Document to XLS with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF 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# and ByteScout PDF Suite

This code in C# shows how to convert protected PDF document to XLS with PDF extractor SDK with this how to tutorial

An easy to understand guide on how to convert protected PDF document to XLS with PDF extractor SDK in C# with this source code sample. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can be applied to convert protected PDF document to XLS with PDF extractor SDK using C#.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout PDF Suite for convert protected PDF document to XLS with PDF extractor SDK below and use it in your application. Follow the instructions from scratch to work and copy the C# code. Use of ByteScout PDF Suite in C# is also described in the documentation included along with the product.

You can download free trial version of ByteScout PDF Suite from our website to see and try many others 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)

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 PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

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

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next