diff --git a/src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-624-2.pdf b/src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-624-2.pdf new file mode 100644 index 000000000..e28aa07d8 Binary files /dev/null and b/src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-624-2.pdf differ diff --git a/src/UglyToad.PdfPig/Annotations/AnnotationProvider.cs b/src/UglyToad.PdfPig/Annotations/AnnotationProvider.cs index 02fc7c4aa..9f7fc5d57 100644 --- a/src/UglyToad.PdfPig/Annotations/AnnotationProvider.cs +++ b/src/UglyToad.PdfPig/Annotations/AnnotationProvider.cs @@ -92,9 +92,10 @@ public IEnumerable GetAnnotations() var width = borderArray.GetNumeric(2).Data; var dashes = default(IReadOnlyList); - if (borderArray.Length == 4 && borderArray.Data[4] is ArrayToken dashArray) + if (borderArray.Length == 4 && borderArray.Data[3] is ArrayToken dashArray) { - dashes = dashArray.Data.OfType().Select(x => x.Data).ToList(); + // PDFBOX-624-2.pdf + dashes = dashArray.Data.OfType().Select(x => x.Data).ToArray(); } border = new AnnotationBorder(horizontal, vertical, width, dashes);