mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Fix out of range exception in AnnotationProvider
This commit is contained in:
parent
b6474dda4c
commit
366fc4fe04
BIN
src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-624-2.pdf
Normal file
BIN
src/UglyToad.PdfPig.Tests/Integration/Documents/PDFBOX-624-2.pdf
Normal file
Binary file not shown.
@ -92,9 +92,10 @@
|
||||
var width = borderArray.GetNumeric(2).Data;
|
||||
var dashes = default(IReadOnlyList<double>);
|
||||
|
||||
if (borderArray.Length == 4 && borderArray.Data[4] is ArrayToken dashArray)
|
||||
if (borderArray.Length == 4 && borderArray.Data[3] is ArrayToken dashArray)
|
||||
{
|
||||
dashes = dashArray.Data.OfType<NumericToken>().Select(x => x.Data).ToList();
|
||||
// PDFBOX-624-2.pdf
|
||||
dashes = dashArray.Data.OfType<NumericToken>().Select(x => x.Data).ToArray();
|
||||
}
|
||||
|
||||
border = new AnnotationBorder(horizontal, vertical, width, dashes);
|
||||
|
Loading…
Reference in New Issue
Block a user