ByteScout Sensitive Data Suite - C# - Auto Redact Text From PDF By Keywords - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Sensitive Data Suite – C# – Auto Redact Text From PDF By Keywords

  • Home
  • /
  • Articles
  • /
  • ByteScout Sensitive Data Suite – C# – Auto Redact Text From PDF By Keywords

auto redact text from PDF by keywords in C# with ByteScout Sensitive Data Suite

Learn auto redact text from PDF by keywords in C#

The documentation is crafted to assist you to apply the features on your side easily. ByteScout Sensitive Data Suite was made to help with auto redact text from PDF by keywords in C#. 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 rich and prolific sample source code in C# for ByteScout Sensitive Data Suite contains various functions and options you should do calling the API to implement auto redact text from PDF by keywords. If you want to implement this functionality, you should copy and paste code below into your app using code editor. Then compile and run your application. Check these C# sample code examples to see if they acknowledge to your needs and requirements for the project.

On our website you may get trial version of ByteScout Sensitive Data Suite for free. Source code samples are included to help you with your C# application.

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

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

Program.cs
      
using System; using System.Drawing; using Bytescout.PDFExtractor; namespace AutoRedactTextFromPDFByKeywords { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.Remover instance Remover remover = new Remover("demo", "demo"); // Load sample PDF document remover.LoadDocumentFromFile(@"sample1.pdf"); // Search Keyword string SearchKeyword = "Martian dichotomy"; // Prepare TextExtractor using (TextExtractor textExtractor = new TextExtractor("demo", "demo")) { // Load document into TextExtractor textExtractor.LoadDocumentFromFile(@"sample1.pdf"); // Set word matching options textExtractor.WordMatchingMode = WordMatchingMode.None; ISearchResult[] searchResults = 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"); } // Open output file in default application System.Diagnostics.Process.Start("result1.pdf"); // Clean up. remover.Dispose(); } } }

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