ByteScout Premium Suite - C# - Reduce memory usage during pdf to html conversion with pdf to html sdk - ByteScout

ByteScout Premium Suite – C# – Reduce memory usage during pdf to html conversion with pdf to html sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Reduce memory usage during pdf to html conversion with pdf to html sdk

How to reduce memory usage during pdf to html conversion with pdf to html sdk in C# using ByteScout Premium Suite

Learn to reduce memory usage during pdf to html conversion with pdf to html sdk in C#

ByteScout simple and easy to understand tutorials are planned to describe the code for both C# beginners and advanced programmers. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can be applied to reduce memory usage during pdf to html conversion with pdf to html sdk using C#.

The following code snippet for ByteScout Premium Suite works best when you need to quickly reduce memory usage during pdf to html conversion with pdf to html sdk in your C# application. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Enjoy writing a code with ready-to-use sample codes in C#.

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.Diagnostics; using Bytescout.PDF2HTML; 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.PDF2HTML.HTMLExtractor instance using (HTMLExtractor extractor = new HTMLExtractor("demo", "demo")) { try { // Load sample PDF document extractor.LoadDocumentFromFile("sample2.pdf"); // Disable page data caching, so processed pages will be disposed automatically extractor.PageDataCaching = PageDataCaching.None; // Save result to file extractor.SaveHtmlToFile("output.html"); } catch (PDF2HTMLException exception) { Console.Write(exception.ToString()); } } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("output.html"); 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