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)
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); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: