Sample source code below will display you how to manage a complex task like convert PDF to CSV (merge multiline text to table cell) with PDF extractor SDK in C#. Want to convert PDF to CSV (merge multiline text to table cell) with PDF extractor SDK in your C# app? ByteScout PDF Suite is designed for it. 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.
The following code snippet for ByteScout PDF Suite works best when you need to quickly convert PDF to CSV (merge multiline text to table cell) with PDF extractor SDK in your C# application. Just copy and paste the code into your C# application’s code and follow the instructions. Use of ByteScout PDF Suite in C# is also described in the documentation included along with the product.
If you want to try other source code samples then the free trial version of ByteScout PDF Suite is available for download from our website. Just try 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; using System.Diagnostics; using Bytescout.PDFExtractor; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.CSVExtractor instance CSVExtractor extractor = new CSVExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile("sample3_multiline.pdf"); // you can change CSV separator symbol (if needed) from "," symbol to another if needed for non-US locales //extractor.CSVSeparatorSymbol = ","; // For multiline cell join extracted cell text into single line extractor.LineGroupingMode = LineGroupingMode.GroupByRows; extractor.Unwrap = true; // Save extracted CSV data extractor.SaveCSVToFile("output.csv"); // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Data has been extracted to 'output.csv' file."); Console.WriteLine(); Console.WriteLine("Press any key to continue and open CSV in default CSV viewer (or Excel)..."); Console.ReadKey(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("output.csv"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: