Knowledgebase (2611)
Children categories
Text annotation is often used in PDF file to show readers the extra information of the item. By using Spire.PDF you can not only add a new annotation, edit an existing annotation, but also delete annotations from PDF file. In this article, we will introduce you how to delete a particular annotation and delete all the annotation at one time.
First, check the PDF document with annotations.

Here comes to the steps of how to remove the bookmarks in C#.
- Download Spire.PDF for .NET and install it correctly. The Spire.PDF installation is clean, professional and wrapped up in a MSI installer.
- Add Spire.Pdf.dll as reference in the downloaded Bin folder though the below path: "..\Spire.Pdf\Bin\NET4.0\ Spire.Pdf.dll".
- Check the code snippet of how to delete the annotations. With Spire.PDF.NET, we can remove both the particular annotation and remove all the annotations.
The code snippet of remove the first annotation from PDF file:
//Example 1: Remove the first annotation from the PDF file
PdfDocument document = new PdfDocument();
//load the pdf file
document.LoadFromFile("E-iceblue.pdf");
//remove the first annotation
PdfAnnotationCollection.Create(document.Pages[0]).RemoveAt(1);
document.SaveToFile("result.pdf");
System.Diagnostics.Process.Start("result.pdf");
The effective screenshot of remove the first annotation:

The code snippet of remove all annotations from PDF file:
//Example 2: Remove all annotations from the PDF file
PdfDocument document = new PdfDocument();
//load the pdf file
document.LoadFromFile("E-iceblue.pdf");
//remove all annotations
PdfAnnotationCollection.Create(document.Pages[0]).Clear();
document.SaveToFile("result.pdf");
System.Diagnostics.Process.Start("result.pdf");
The effective screenshot of remove all the annotations:

In this document, I will introduce you how to add Spire. Barcode controls to Toolbox for Windows Forms application.
If you have already installed Spire.Barcode, you can add controls this way:
"Start" → "Programs" → "e-iceblue" → "Spire.Barcode": Click "Add Controls into VS Toolbox".

Click "Add" to add controls.

Right-click on the blank part of the Toolbox - "Add Ta" - name the new Tab "Spire Controls":

Right-click on the blank part below "Spire Controls" → "Choose Items" → ".NET Framework Components" → "Browse" to the "Bin" folder → find the file "Spire.Barcode.dll" → "Open".

Click "OK". Then you have added controls to Toolbox successfully.

Spire.Presentation for .NET is a professional PowerPoint® compatible API that enables developers to create, read, write, modify, convert and Print PowerPoint documents on any .NET platform (Target .NET Framework, .NET Core, .NET Standard, .NET 5.0, .NET 6.0, Xamarin & Mono Android). As an independent PowerPoint .NET API, Spire.Presentation for .NET doesn't need Microsoft PowerPoint to be installed on machines.
Spire.Presentation for .NET supports PPT, PPS, PPTX and PPSX presentation formats. It provides functions such as managing text, image, shapes, charts, tables, animations, comments, hyperlinks, watermarks, audio and video on slides. It also supports exporting presentation slides to images (PNG, JPG, TIFF, EMF, SVG), PDF, XPS, HTML, Markdown format etc.


