Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Sat Nov 08, 2025 3:05 am

How to remove black border around PdfFreeTextAnnotation.

I have tried this but it didn't work.

// Create a new PdfAnnotationBorder object with a specified width
Spire.Pdf.Annotations.PdfAnnotationBorder border = new Spire.Pdf.Annotations.PdfAnnotationBorder(0f);

// Assign the created font to the font property of the free text annotation
textAnnotation.Font = font;

textAnnotation.TextMarkupColor = Color.Black;

// Assign the created border to the border property of the free text annotation
textAnnotation.Border = border;


// Set the border color of the free text annotation
textAnnotation.BorderColor = Color.Transparent;

// Set the line ending style of the free text annotation to slash
textAnnotation.LineEndingStyle = Spire.Pdf.Annotations.PdfLineEndingStyle.None;

Thanks

eddie.torres
 
Posts: 5
Joined: Thu Oct 16, 2025 6:06 pm

Sat Nov 08, 2025 3:24 am

The libraries have a bug. They fail to set the border thickness to 0 (see attached image).

Spire.Pdf.Annotations.PdfAnnotationBorder border = new Spire.Pdf.Annotations.PdfAnnotationBorder(0f);

Thanks

eddie.torres
 
Posts: 5
Joined: Thu Oct 16, 2025 6:06 pm

Mon Nov 10, 2025 7:36 am

Hello,

Thank you for your post.
I have reproduced this issue and logged it into our issue tracking system with the tracking number SPIREPDF-7816. Our Dev team will further investigate and fix it. We will keep you updated on the progress of the issue.

Sincerely,
Lisa.li
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1510
Joined: Wed Apr 25, 2018 3:20 am

Mon Dec 08, 2025 3:05 am

Hello,

Thanks for your patience.
Glad to inform you that our latest version (Spire.PDF Pack(Hotfix) Version:11.12.0) contains the fixes of SPIREPDF-7816. Please test it.

https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
https://www.nuget.org/packages/Spire.PDF/11.12.0
https://www.nuget.org/packages/Spire.PDFfor.NETStandard/11.12.0

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1510
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF