Easy to understand coding instructions are written to assist you to try-out the features without the requirement to write your own code. ByteScout Sensitive Data Suite was created to assist auto redact text from PDF by keywords in VB.NET. ByteScout Sensitive Data Suite is the bundle that includes multiple components from ByteScout for working with sensitive and personal data. With these components you may analyze, redact, remove, blackout sensitive data in documents and pdf.
Want to speed up the application development? Then this VB.NET, code samples for VB.NET, developers help to speed up the application development and writing a code when using ByteScout Sensitive Data Suite. Just copy and paste this VB.NET sample code to your VB.NET application’s code editor, add a reference to ByteScout Sensitive Data Suite (if you haven’t added yet) and you are ready to go! Enjoy writing a code with ready-to-use sample VB.NET codes to add auto redact text from PDF by keywords functions using ByteScout Sensitive Data Suite in VB.NET.
ByteScout Sensitive Data Suite free trial version is available for download from our website. Free trial also includes programming tutorials along with source code samples.
Imports System.Drawing Imports Bytescout.PDFExtractor Class Program Shared Sub Main(ByVal args As String()) ' Create Bytescout.PDFExtractor.Remover instance Dim remover As New Remover("demo", "demo") ' Load sample PDF document remover.LoadDocumentFromFile("sample1.pdf") ' Search Keyword Dim SearchKeyword As String = "Martian dichotomy" ' Prepare TextExtractor Using textExtractor As New TextExtractor("demo", "demo") ' Load document into TextExtractor textExtractor.LoadDocumentFromFile("sample1.pdf") ' Set word matching options textExtractor.WordMatchingMode = WordMatchingMode.None Dim searchResults() As ISearchResult = textExtractor.FindAll(0, SearchKeyword, caseSensitive:=False) ' Remove text objects find by SearchResults. ' NOTE: The removed text might be larger than the specified rectangle. Currently the Remover Is unable ' to split PDF text objects. remover.RemoveText(searchResults, "result1.pdf") End Using ' Clean up. remover.Dispose() Console.WriteLine() Console.WriteLine("Press any key to continue and open result PDF files in default PDF viewer...") Console.ReadKey() Process.Start("result1.pdf") End Sub End Class