ByteScout PDF To HTML SDK - C# - Reduce Memory Usage During PDF to HTML Conversion - 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 To HTML SDK – C# – Reduce Memory Usage During PDF to HTML Conversion

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF To HTML SDK – C# – Reduce Memory Usage During PDF to HTML Conversion

How to reduce memory usage during PDF to HTML conversion in C# with ByteScout PDF To HTML SDK

The tutorial shows how to reduce memory usage during PDF to HTML conversion in C#

Every ByteScout tool contains example C# source codes that you can find here or in the folder with installed ByteScout product. ByteScout PDF To HTML SDK: the PDF to HTML converter with visual layout, positions, vectors, images and form fields. Generated HTML can be viewed using browser without PDF reader. It can reduce memory usage during PDF to HTML conversion in C#.

The SDK samples like this one below explain how to quickly make your application do reduce memory usage during PDF to HTML conversion in C# with the help of ByteScout PDF To HTML SDK. Just copy and paste the code into your C# application’s code and follow the instruction. You can use these C# sample examples in one or many applications.

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.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 PDF To HTML SDK Home Page

Explore ByteScout PDF To HTML SDK Documentation

Explore Samples

Sign Up for ByteScout PDF To HTML 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 To HTML SDK Home Page

Explore ByteScout PDF To HTML SDK Documentation

Explore Samples

Sign Up for ByteScout PDF To HTML SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next