The coding instructions are formulated to help you to try-out the features without the requirement to write your own code. ByteScout Premium Suite: the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can extract images by page from PDF with PDF extractor SDK in 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 extract images by page from PDF with PDF extractor SDK below and use it in your application. Just copy and paste the code into your C# application’s code and follow the instructions. Enjoy writing a code with ready-to-use sample codes in C#.
All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.
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; using System.Drawing.Imaging; using Bytescout.PDFExtractor; using System.Diagnostics; namespace ExtractImagesByPages { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.ImageExtractor instance ImageExtractor extractor = new ImageExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile(@".\sample1.pdf"); // Get count of pages int pageCount = extractor.GetPageCount(); // Extract images from each page for (int i = 0; i < pageCount; i++) { int j = 0; // Initialize page images enumeration if (extractor.GetFirstPageImage(i)) { do { string outputFileName = "page" + i + "image" + j + ".png"; // Save image to file extractor.SaveCurrentImageToFile(outputFileName, ImageFormat.Png); j++; } while (extractor.GetNextImage()); // Advance image enumeration } } // Cleanup extractor.Dispose(); // Open first output file in default associated application ProcessStartInfo processStartInfo = new ProcessStartInfo("page0image0.png"); 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: