File tree 3 files changed +19
-2
lines changed
3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -660,7 +660,7 @@ class Annotation {
660
660
661
661
if ( array . length === 4 ) {
662
662
// Dash array available
663
- this . borderStyle . setDashArray ( array [ 3 ] ) ;
663
+ this . borderStyle . setDashArray ( array [ 3 ] , /* forceStyle = */ true ) ;
664
664
}
665
665
}
666
666
} else {
@@ -981,8 +981,9 @@ class AnnotationBorderStyle {
981
981
* @public
982
982
* @memberof AnnotationBorderStyle
983
983
* @param {Array } dashArray - The dash array with at least one element
984
+ * @param {boolean } [forceStyle]
984
985
*/
985
- setDashArray ( dashArray ) {
986
+ setDashArray ( dashArray , forceStyle = false ) {
986
987
// We validate the dash array, but we do not use it because CSS does not
987
988
// allow us to change spacing of dashes. For more information, visit
988
989
// http://www.w3.org/TR/css3-background/#the-border-style.
@@ -1002,6 +1003,12 @@ class AnnotationBorderStyle {
1002
1003
}
1003
1004
if ( isValid && ! allZeros ) {
1004
1005
this . dashArray = dashArray ;
1006
+
1007
+ if ( forceStyle ) {
1008
+ // Even though we cannot use the dash array in the display layer,
1009
+ // at least ensure that we use the correct border-style.
1010
+ this . setStyle ( Name . get ( "D" ) ) ;
1011
+ }
1005
1012
} else {
1006
1013
this . width = 0 ; // Adobe behavior when the array is invalid.
1007
1014
}
Original file line number Diff line number Diff line change
1
+ https://web.archive.org/web/20160212224934/http://www.ghostscript.com/doc/examples/annots.pdf
Original file line number Diff line number Diff line change 1822
1822
"link" : false ,
1823
1823
"type" : " eq"
1824
1824
},
1825
+ { "id" : " bug1219400" ,
1826
+ "file" : " pdfs/bug1219400.pdf" ,
1827
+ "md5" : " a1554914cc9653d5ee0b9220657b334f" ,
1828
+ "rounds" : 1 ,
1829
+ "link" : true ,
1830
+ "lastPage" : 1 ,
1831
+ "type" : " eq" ,
1832
+ "annotations" : true
1833
+ },
1825
1834
{ "id" : " bug1245391" ,
1826
1835
"file" : " pdfs/bug1245391_reduced.pdf" ,
1827
1836
"md5" : " 6c946045ee0f2f663f269717c0f1614a" ,
You can’t perform that action at this time.
0 commit comments