ByteScout Premium Suite - C# - Reduce Memory Usage for PDF to Text with PDF Extractor SDK - ByteScout

ByteScout Premium Suite – C# – Reduce Memory Usage for PDF to Text with PDF Extractor SDK

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

How to reduce memory usage for PDF to text with PDF extractor SDK in C# using ByteScout Premium Suite

Learn to code in C# to reduce memory usage for PDF to text with PDF extractor SDK with this step-by-step tutorial

These sample source codes on this page below are displaying how to reduce memory usage for PDF to text with PDF extractor SDK in C#. ByteScout Premium Suite: the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can reduce memory usage for PDF to text with PDF extractor SDK in C#.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Premium Suite. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Complete and detailed tutorials and documentation are available along with installed ByteScout Premium Suite if you’d like to learn more about the topic and the details of the API.

The trial version of ByteScout Premium Suite can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

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 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