ByteScout Premium Suite - C# - Convert pdf to 1-bit bmp with pdf renderer 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 Premium Suite – C# – Convert pdf to 1-bit bmp with pdf renderer sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Convert pdf to 1-bit bmp with pdf renderer sdk

How to convert pdf to 1 bit bmp with pdf renderer sdk in C# using ByteScout Premium Suite

If you want to learn more then this tutorial will show how to convert pdf to 1 bit bmp with pdf renderer sdk in C#

The sample shows instructions and algorithm of how to convert pdf to 1 bit bmp with pdf renderer sdk and how to make it run in your C# application. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording and you can use it to convert pdf to 1 bit bmp with pdf renderer sdk with C#.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for convert pdf to 1 bit bmp with pdf renderer sdk below and use it in your 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. Further improvement of the code will make it more robust.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others source code samples for C#.

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.Drawing; using System.Drawing.Imaging; using System.Diagnostics; using Bytescout.PDFRenderer; namespace PDF2BMP { class Program { static void Main(string[] args) { // Create an instance of Bytescout.PDFRenderer.RasterRenderer object and register it. RasterRenderer renderer = new RasterRenderer(); renderer.RegistrationName = "demo"; renderer.RegistrationKey = "demo"; // Load PDF document. renderer.LoadDocumentFromFile("multipage.pdf"); RenderingOptions renderingOptions = new RenderingOptions(); // Set pixel format to 1-bit renderingOptions.ImageBitsPerPixel = ImageBitsPerPixel.BPP1; for (int i = 0; i < renderer.GetPageCount(); i++) { // Save 1-bit image to file renderer.Save("image" + i + ".bmp", RasterImageFormat.BMP, i, 200, renderingOptions); } // Cleanup renderer.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("image0.bmp"); 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