Sample source code below will display you how to manage a complex task like split protected pdf document with pdf extractor sdk in VB.NET. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can split protected pdf document with pdf extractor sdk in VB.NET.
These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Data Extraction Suite. Follow the instructions from scratch to work and copy the VB.NET code. Complete and detailed tutorials and documentation are available along with installed ByteScout Data Extraction Suite if you’d like to learn more about the topic and the details of the API.
All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.
Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) Dim inputFile As String = "encrypted (password is 'password').pdf" Using splitter As New DocumentSplitter("demo", "demo") ' Handle `PasswordRequired` event AddHandler splitter.PasswordRequired, New PasswordEventHandler(AddressOf splitter_PasswordRequired) ' Ignore document permissions splitter.CheckPermissions = False ' Split document splitter.Split(inputFile, "part1.pdf", "part2.pdf", 3) End Using Console.WriteLine() Console.WriteLine("Press any key...") Console.ReadKey() End Sub Private Shared Sub splitter_PasswordRequired(sender As Object, document As String, ByRef password As String) ' Ask user for password And put it to `Password` property. password = "password" End Sub End Class