Here you may get thousands pre-made source code samples for simple implementation in your own programming C# projects. ByteScout Premium Suite was created to assist data masking in PDF with PDF extractor SDK in C#. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.
This rich and prolific sample source code in C# for ByteScout Premium Suite contains various functions and options you should do calling the API to implement data masking in PDF with PDF extractor SDK. To use data masking in PDF with PDF extractor SDK in your C# project or application just copy & paste the code and then run your app! C# application implementation mostly involves various stages of the software development so even if the functionality works please check it with your data and the production environment.
Visit our website to get a free trial version of ByteScout Premium Suite. Free trial contains many of source code samples to help you with your C# project.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using Bytescout.PDFExtractor; using System; using System.Diagnostics; using System.IO; using System.Text.RegularExpressions; namespace RepairText { class Program { static void Main(string[] args) { try { // Generate CSVExtractor instance using (CSVExtractor extractor = new CSVExtractor("demo", "demo")) { // Load PDF document extractor.LoadDocumentFromFile("sample.pdf"); // Get all data string allData = extractor.GetCSV(); // Regular expressions and replacements string ssnRegex = @"\d{3}[-]?\d{2}[-]?\d{4}"; string ssnReplace = "***-**-****"; string phoneRegex = @"\d{3}[-]?\d{3}[-]?\d{4}"; string phoneReplace = "***-***-****"; // Find and mask SSN and phone numbers allData = Regex.Replace(allData, ssnRegex , ssnReplace); allData = Regex.Replace(allData, phoneRegex, phoneReplace); // Write as CSV File.WriteAllText("output.csv", allData); // Open file ProcessStartInfo processStartInfo = new ProcessStartInfo("output.csv"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine("Press enter key to close..."); Console.ReadLine(); } } }
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: