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

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

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

Learn to code in C# to remove text from PDF with PDF extractor SDK with this step-by-step tutorial

An easy to understand sample source code to learn how to remove text from PDF with PDF extractor SDK in C# ByteScout Premium Suite can remove text from PDF with PDF extractor SDK. It can be applied from 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.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Premium Suite for remove text from PDF with PDF extractor SDK below and use it in your application. Simply copy and paste in your C# project or application you and then run your app! Further improvement of the code will make it more robust.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others source code samples for C#.

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next