ByteScout PDF Extractor SDK - C# - Reduce Memory Usage for PDF to Text - 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 Extractor SDK – C# – Reduce Memory Usage for PDF to Text

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Reduce Memory Usage for PDF to Text

How to reduce memory usage for PDF to text in C# using ByteScout PDF Extractor SDK

The tutorial below will demonstrate how to reduce memory usage for PDF to text in C#

The sample source codes on this page shows how to reduce memory usage for PDF to text in C#. ByteScout PDF Extractor SDK can reduce memory usage for PDF to text. It can be used from C#. ByteScout PDF Extractor SDK is the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction.

The SDK samples like this one below explain how to quickly make your application do reduce memory usage for PDF to text in C# with the help of ByteScout PDF Extractor SDK. Just copy and paste the code into your C# application’s code and follow the instruction. Further enhancement of the code will make it more vigorous.

ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with 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; using System.IO; using System.Diagnostics; using Bytescout.PDFExtractor; namespace ReduceMemoryUsage { class Program { static void Main(string[] args) { // When processing huge PDF documents you may run into OutOfMemoryException. // This example demonstrates a way to spare the memory by disabling page data caching. // Create Bytescout.PDFExtractor.TextExtractor instance using (TextExtractor extractor = new TextExtractor("demo", "demo")) { try { // Load sample PDF document extractor.LoadDocumentFromFile("sample2.pdf"); // Disable page data caching, so processed pages wiil be disposed automatically extractor.PageDataCaching = PageDataCaching.None; // Save extracted text to file extractor.SaveTextToFile("output.txt"); } catch (PDFExtractorException exception) { Console.Write(exception.ToString()); } } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("output.txt"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

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

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 Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next