The code displayed below will guide you to install an VB.NET app to remove protection from pdf with pdf sdk. ByteScout Premium Suite can remove protection from pdf with pdf sdk. It can be applied from VB.NET. ByteScout Premium Suite is the bundle that includes twelve 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 VB.NET code from ByteScout Premium Suite for remove protection from pdf with pdf sdk below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. If you want to use these VB.NET sample examples in one or many applications then they can be used easily.
The trial version of ByteScout Premium Suite can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
Imports Bytescout.PDF Module Program Sub Main() Try 'Files Dim fileName As String = "ProtectedPDFFile.pdf" Dim fileName_UnProtected As String = "UnProtectedPDFFile.pdf" 'Protected file password Dim filePassword As String = "admin@123" 'Process file to remove password Dim document As Document = New Document() document.RegistrationName = "demo" document.RegistrationKey = "demo" document.Load(fileName, filePassword) ' Remove password protection and encryption document.Security.OwnerPassword = String.Empty document.Security.UserPassword = String.Empty document.Security.EncryptionAlgorithm = EncryptionAlgorithm.None ' Remove restrictions document.Security.AllowAccessibilitySupport = True document.Security.AllowAssemlyDocument = True document.Security.AllowContentExtraction = True document.Security.AllowFillForms = True document.Security.AllowModifyAnnotations = True document.Security.AllowModifyDocument = True document.Security.AllowPrintDocument = True document.Security.PrintQuality = PrintQuality.HightResolution 'Save Unprotected file document.Save(fileName_UnProtected) Console.WriteLine("PDF restrictions removed successfully!") Process.Start(fileName_UnProtected) Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine("Press any key to continue...") Console.ReadLine() End Sub End Module