ByteScout PDF Suite - C# - Optimize PDF with PDF Extractor SDK - 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 Suite – C# – Optimize PDF with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Optimize PDF with PDF Extractor SDK

How to optimize PDF with PDF extractor SDK in C# using ByteScout PDF Suite

If you want to learn more then this tutorial will show how to optimize PDF with PDF extractor SDK in C#

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout PDF Suite is the set that includes 6 SDK products 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. It can optimize PDF with PDF extractor SDK in C#.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout PDF 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! Applying C# application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.

ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and 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 Bytescout.PDFExtractor; namespace OptimizePDF { class Program { static void Main() { // Create Bytescout.PDFExtractor.DocumentOptimizer instance using (DocumentOptimizer optimizer = new DocumentOptimizer("demo", "demo")) { // Try various optimization options OptimizationOptions optimizationOptions = new OptimizationOptions(); optimizationOptions.ImageOptimizationFormat = ImageOptimizationFormat.JPEG; optimizationOptions.JPEGQuality = 25; optimizationOptions.ResampleImages = true; optimizationOptions.ResamplingResolution = 120; // Optimize document and save it to new file optimizer.OptimizeDocument(@".\sample1.pdf", @".\optimized.pdf", optimizationOptions); } Console.WriteLine("Optimized document has been saved as " + Path.GetFullPath(@".\optimized.pdf")); Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadLine(); } } }

ON-PREMISE OFFLINE SDK

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

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 Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next