ByteScout PDF Suite - C# - Remove Text from PDF with PDF Extractor SDK - ByteScout

ByteScout PDF Suite – C# – Remove Text from PDF with PDF Extractor SDK

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

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

Step-by-step tutorial on how to remove text from PDF with PDF extractor SDK in C#

Remove text from PDF with PDF extractor SDK is simple to apply in C# if you use these source codes below. ByteScout PDF Suite is the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript and you can use it to remove text from PDF with PDF extractor SDK with C#.

The following code snippet for ByteScout PDF Suite works best when you need to quickly remove text from PDF with PDF extractor SDK in your C# application. Simply copy and paste in your C# project or application you and then run your app! Want to see how it works with your data then code testing will allow the function to be tested and work properly.

ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and source code samples.

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

Explore ByteScout PDF Suite Documentation

Explore Samples

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

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next