Migrating from ByteScout SDK#

This guide is designed to help you transition your application from ByteScout SDK to MuPDF.NET by finding the equivalent methods and techniques to achieve your goals.

Setting Up the Environment#

The ByteScout SDK will already be linked and integrated into your application for example:

// Sample setup with ByteScout SDK
using Bytescout.PDFExtractor;

Loading a PDF Document#

TextExtractor textExtractor = new TextExtractor();
textExtractor.LoadDocumentFromFile("sample.pdf");

Extracting Text from a Page#

TextExtractor textExtractor = new TextExtractor();
textExtractor.LoadDocumentFromFile("sample.pdf");
string extractedText = textExtractor.GetText();
Console.WriteLine(extractedText);

Converting a PDF Page to an Image#

RasterRenderer renderer = new RasterRenderer();
renderer.LoadDocumentFromFile("sample.pdf");
renderer.Save("sample.png", RasterImageFormat.PNG, 0, 75);