ByteScout Data Extraction Suite - C# - Remove Text from PDF with PDF Extractor SDK - 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 Data Extraction Suite – C# – Remove Text from PDF with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – C# – Remove Text from PDF with PDF Extractor SDK

How to remove text from PDF with PDF extractor SDK in C# using ByteScout Data Extraction Suite

This code in C# shows how to remove text from PDF with PDF extractor SDK with this how to tutorial

This sample source code below will display you how to remove text from PDF with PDF extractor SDK in C#. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to remove text from PDF with PDF extractor SDK with C#.

The SDK samples given below describe how to quickly make your application do remove text from PDF with PDF extractor SDK in C# with the help of ByteScout Data Extraction Suite. Simply copy and paste in your C# project or application you and then run your app! This basic programming language sample code for C# will do the whole work for you to remove text from PDF with PDF extractor SDK.

Trial version of ByteScout Data Extraction Suite is available for free. Source code samples are included to help you with your C# app.

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 RemoveText { 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"); // Remove text "LOREM IPSUM" and save edited document as "result1.pdf". // NOTE: The removed text might be larger than the search string. Currently the Remover deletes // the whole PDF text object containing the search string. remover.RemoveText(0, "LOREM IPSUM", true, @"result1.pdf"); // Remove text objects contained in the specified rectangle or intersecting with it. // NOTE: The removed text might be larger than the specified rectangle. Currently the Remover is unable // to split PDF text objects. remover.RemoveText(0, new RectangleF(74f, 550f, 489f, 67f), @"result2.pdf"); // Remove text object contained in the specified point. // NOTE: The removed text might be larger than a word in the specified point. Currently the Remover is able // to remove only the whole PDF text object containing the word. remover.RemoveText(0, new PointF(121f, 230f), @"result3.pdf"); // Clean up. remover.Dispose(); } } }

ON-PREMISE OFFLINE SDK

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

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction 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 Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next