ByteScout Sensitive Data Suite - VB.NET - Remove PII Data From PDF - ByteScout

ByteScout Sensitive Data Suite – VB.NET – Remove PII Data From PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout Sensitive Data Suite – VB.NET – Remove PII Data From PDF

How to remove PII data from PDF in VB.NET and ByteScout Sensitive Data Suite

This code in VB.NET shows how to remove PII data from PDF with this how to tutorial

Source code documentation samples give simple and easy method to install a needed feature into your application. Want to remove PII data from PDF in your VB.NET app? ByteScout Sensitive Data Suite is designed for it. ByteScout Sensitive Data Suite is the set that includes SDK tools from ByteScout for working with sensitive and personal data. With these tools you may analyze, redact, remove, blackout sensitive data in documents and pdf.

This prolific sample source code in VB.NET for ByteScout Sensitive Data Suite contains various functions and other necessary options you should do calling the API to remove PII data from PDF. IF you want to implement the functionality, just copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Want to see how it works with your data then code testing will allow the function to be tested and work properly.

You can download free trial version of ByteScout Sensitive Data Suite from our website with this and other source code samples for VB.NET.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Module1.vb
      
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("samplePDF_SSNNo.pdf") ' Prepare TextExtractor Using textExtractor As New TextExtractor("demo", "demo") ' Load document into TextExtractor textExtractor.LoadDocumentFromFile("samplePDF_SSNNo.pdf") ' Search SSN in format 202-55-0130 'See the complete regular expressions reference at https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx Dim regexPattern As String = "[0-9]{3}-[0-9]{2}-[0-9]{4}" ' Enable RegexSearch textExtractor.RegexSearch = True ' Set word matching options textExtractor.WordMatchingMode = WordMatchingMode.None Dim searchResults() As ISearchResult = textExtractor.FindAll(0, regexPattern, 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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Sensitive Data Suite Home Page

Explore ByteScout Sensitive Data Suite Documentation

Explore Samples

Sign Up for ByteScout Sensitive Data Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Sensitive Data Suite Home Page

Explore ByteScout Sensitive Data Suite Documentation

Explore Samples

Sign Up for ByteScout Sensitive Data Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

prev
next