mozilla/pdf.js — pull request #4080 by Snuffleupagus (2014-01-07 16:18:23+00:00)
Title: Fix annotation border issue (bug 957034)

According to the PDF specification, the `Border` entry in an Annotation dictionary may contain a line dash pattern: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=392.
The line dash pattern is outlined here: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#M7.9.24210.3Heading.Line.Dash.Pattern.

The PDF file in [bug 957034](https://bugzilla.mozilla.org/show_bug.cgi?id=957034) contains link annotations with `Border` entries of the form `[10 10 10 [0]]`, which means that the links should have 10 unit wide borders with a line dash pattern of `[0]`.
According to the PDF specification, the entries in dashArray must obey: "the numbers shall be nonnegative and not all zero". This means that the line dash pattern used in the PDF file isn't valid (i.e. yet another bad PDF generator).

I don't know if assigning the border zero width when the line dash pattern is invalid is the right thing to do, but it does solve the issue, and it appears to be what happens in Adobe Reader.

*Since this issue should hopefully be rare, I didn't know if it was really necessary to include a test. Should I attach a test file to this PR?*

Fixes [bug 957034](https://bugzilla.mozilla.org/show_bug.cgi?id=957034).