Every ByteScout tool includes simple example C# source codes that you can get here or in the folder with installed ByteScout product. ByteScout Premium Suite can find keyword and extract page in PDF with PDF extractor SDK. It can be applied from C#. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.
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 find keyword and extract page in 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. Use of ByteScout Premium Suite in C# is also described in the documentation included along with the product.
Our website gives trial version of ByteScout Premium Suite for free. It also includes 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)
// This example page extraction by found keyword. using System; using Bytescout.PDFExtractor; namespace SplittingExample { class Program { static void Main(string[] args) { string inputFile = @".\sample2.pdf"; // Create Bytescout.PDFExtractor.TextExtractor instance TextExtractor extractor = new TextExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile(inputFile); int pageCount = extractor.GetPageCount(); // Search each page for a keyword for (int i = 0; i < pageCount; i++) { if (extractor.Find(i, "bombardment", false)) { // Extract page using (DocumentSplitter splitter = new DocumentSplitter("demo", "demo")) { splitter.OptimizeSplittedDocuments = true; int pageNumber = i + 1; // (!) page number in ExtractPage() is 1-based string outputFile = @".\page" + pageNumber + ".pdf"; splitter.ExtractPage(inputFile, outputFile, pageNumber); Console.WriteLine("Extracted page " + pageNumber + " to file \"" + outputFile +"\""); } } } // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key..."); Console.ReadKey(); } } }
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: