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.

Thu Nov 13, 2025 3:52 am

Hi,

The PdfLineAnnotation does not show up in the image created by:

Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument(spirestream);
Spire.Pdf.PdfPageBase page = doc.Pages[0];
int[] linePoints = new int[] {10, 10, 200, 10 };
Spire.Pdf.Annotations.PdfLineAnnotation lineAnnotation = new Spire.Pdf.Annotations.PdfLineAnnotation(linePoints);
lineAnnotation.lineBorder.BorderStyle = Spire.Pdf.Fields.PdfBorderStyle.Solid;
lineAnnotation.lineBorder.BorderWidth = 1;
lineAnnotation.Flags = Spire.Pdf.Annotations.PdfAnnotationFlags.Default;
lineAnnotation.InnerLineColor = new PdfRGBColor(this.colorPickerButtonHeaderLine.SelectedColor);
lineAnnotation.BackColor = new PdfRGBColor(this.colorPickerButtonHeaderLine.SelectedColor);
lineAnnotation.LeaderLineExt = 0;
lineAnnotation.LeaderLine = 0;
lineAnnotation.BeginLineStyle = Spire.Pdf.Annotations.PdfLineEndingStyle.None;
lineAnnotation.EndLineStyle = Spire.Pdf.Annotations.PdfLineEndingStyle.None;
page.Annotations.Add(lineAnnotation);

pictureBox1.Image = doc.SaveAsImage(0, Spire.Pdf.Graphics.PdfImageType.Bitmap, dpi, dpi);


PdfFreeTextAnnotation shows up but PdfLineAnnotation doesn't.

Regards,

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

Thu Nov 13, 2025 8:00 am

Hello

Thanks for your post.
I have reproduced the issue and logged it into our bug tracking system with SPIREPDF-7831. Our Dev team colleagues are conducting the investigation now. Meanwhile, they have made internal adjustments for your other reported issues. It is in the testing phase.
Once the hotfix version is available, I will let you know. Sorry for the inconvenience caused.

Sincerely,
Lisa
E-iceblue support team
User avatar

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

Mon Dec 08, 2025 3:11 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-7831. 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: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF

cron