1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Enable/disable image smoothing based on image interpolate value. (bug 1722191)

While some of the output looks worse to my eye, this behavior more
closely matches what I see when I open the PDFs in Adobe acrobat.

Fixes: #4706, #9713, #8245, #1344
This commit is contained in:
Brendan Dahl 2021-09-08 17:31:10 -07:00
parent 8a79f13e5a
commit f38fb42b42
13 changed files with 74 additions and 9 deletions

View file

@ -20,15 +20,17 @@
const {
AnnotationLayer,
AnnotationMode,
CSS_PIXELS_PER_INCH,
getDocument,
GlobalWorkerOptions,
PDF_PIXELS_PER_INCH,
renderTextLayer,
XfaLayer,
} = pdfjsLib;
const { SimpleLinkService } = pdfjsViewer;
const WAITING_TIME = 100; // ms
const PDF_TO_CSS_UNITS = 96.0 / 72.0;
const PDF_TO_CSS_UNITS = CSS_PIXELS_PER_INCH / PDF_PIXELS_PER_INCH;
const CMAP_URL = "/build/generic/web/cmaps/";
const CMAP_PACKED = true;
const STANDARD_FONT_DATA_URL = "/build/generic/web/standard_fonts/";

View file

@ -69,6 +69,7 @@
!issue8229.pdf
!issue8276_reduced.pdf
!issue8372.pdf
!issue9713.pdf
!xfa_filled_imm1344e.pdf
!issue8424.pdf
!issue8480.pdf
@ -150,6 +151,7 @@
!complex_ttf_font.pdf
!issue3694_reduced.pdf
!extgstate.pdf
!issue4706.pdf
!rotation.pdf
!simpletype3font.pdf
!sizes.pdf

BIN
test/pdfs/issue4706.pdf Normal file

Binary file not shown.

BIN
test/pdfs/issue9713.pdf Normal file

Binary file not shown.

View file

@ -3110,6 +3110,12 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue4706",
"file": "pdfs/issue4706.pdf",
"md5": "f3e90a3cf52550583fa2a07a138b8660",
"rounds": 1,
"type": "eq"
},
{ "id": "issue11242",
"file": "pdfs/issue11242_reduced.pdf",
"md5": "ba50b6ee537f3e815ccfe0c99e598e05",
@ -4421,6 +4427,12 @@
"link": true,
"type": "eq"
},
{ "id": "issue9713",
"file": "pdfs/issue9713.pdf",
"md5": "a62bd42d12271105b26a68c8eae5ea5f",
"rounds": 1,
"type": "eq"
},
{ "id": "issue1936-text",
"file": "pdfs/issue1936.pdf",
"md5": "7302eb9b6a626308e2a933aaed9e1756",