mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #13457 from Snuffleupagus/issue-13242
Work-around for HighlightAnnotations without a top-level /ExtGState-entry (issue 13242)
This commit is contained in:
commit
5e5641b147
4 changed files with 19 additions and 1 deletions
|
@ -2676,7 +2676,17 @@ class HighlightAnnotation extends MarkupAnnotation {
|
|||
null
|
||||
));
|
||||
if (quadPoints) {
|
||||
if (!this.appearance) {
|
||||
const resources =
|
||||
this.appearance && this.appearance.dict.get("Resources");
|
||||
|
||||
if (!this.appearance || !(resources && resources.has("ExtGState"))) {
|
||||
if (this.appearance) {
|
||||
// Workaround for cases where there's no /ExtGState-entry directly
|
||||
// available, e.g. when the appearance stream contains a /XObject of
|
||||
// the /Form-type, since that causes the highlighting to completely
|
||||
// obsure the PDF content below it (fixes issue13242.pdf).
|
||||
warn("HighlightAnnotation - ignoring built-in appearance stream.");
|
||||
}
|
||||
// Default color is yellow in Acrobat Reader
|
||||
const fillColor = this.color
|
||||
? Array.from(this.color).map(c => c / 255)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue