v2.4.456
From now on we produce a non-translated/non-polyfilled build for modern browsers by default. However, we also provide the translated/polyfilled build for older browsers in a separate bundle (with the -es5-dist.zip
suffix).
Changes since v2.3.200:
#11202 Bump versions in pdfjs.config
#11198 [PDFSidebarResizer] Add a couple of (small) readability improvements in the code
#11212 [MessageHandler] Some additional (small) clean-up of the code
#11213 Update the gulp importl10n
command to fetch the active language codes
#11186 Improve the heuristics, in PartialEvaluator._buildSimpleFontToUnicode
, for glyphNames of the Cdd{d}/cdd{d} format (issue 9655)
#11209 Use square brackets for optional properties in the JSDoc comments of src/display/api.js
#11222 Remove locales which are unmaintained and/or not shipping in Nightly (PR 11213 follow-up)
#11219 [api-minor] Replace all deprecated
calls with throwing of actual Error
s
#11218 Attempt to fallback to a default font, for non-available ones, in PartialEvaluator.loadFont
#11220 Added create react app example with typescript and basic usage
#11228 Enable the ESLint rule accessor-pairs
for Classes
#11232 Cache processed 'ExtGState's in PartialEvaluator.hasBlendModes
to avoid unnecessary parsing/lookups
#11234 Convert a number of reference tests, for documents with corrupt XRef tables, from load
to eq
#11237 Update src/shared/compatibility.js
to only run with SKIP_BABEL = false
set
#11235 Improve the JSDoc comments
#11246 Tweak the isIOS
check, in web/viewer_compatibility
, to attempt to support newer Safari versions (issue 11245)
#11247 Change variable assignment
#11253 Avoid handling keyboard shortcuts for contentEditable
DOM elements (issue 7156)
#11250 Silence the Autoprefixer message being printed with all build logs
#11256 [Firefox] Remove unused addon l10n
files (PR 9566 follow-up)
#11257 Remove/update skipPages
annotations from test/test_manifest.json
#11231 Allow over-writing entries, in XRef.indexObjects
, only when the generation number matches (issues 11230, 11139, 9552, 9129, 7303)
#11260 Update npm packages
#11243 Add a fallback for non-embedded composite Verdana fonts (issue 11242)
#11261 Re-factor sending of various Exceptions from the worker to the API
#11262 Re-add the en-US chrome.properties
l10n file, to avoid it being removed at mozilla-central (PR 11256 follow-up)
#11263 Attempt to reduce resource usage, by not eagerly fetching all pages, for long/large documents
#11268 refactor: viewer.css refactored, duplications removed
#11271 Re-factor StatTimer
usage, in src/display/api.js
, and remove DummyStatTimer
#11273 [api-minor] Support custom offsetX
/offsetY
values in PDFPageProxy.getViewport
and PageViewport.clone
#11282 Update l10n files
#11281 Support Blend Modes which are specified in an Array of Names (issue 11279)
#11283 Ensure that PartialEvaluator.hasBlendModes
handles Blend Modes in Arrays (PR 11281 follow-up)
#11284 Make the ObjectLoader
use more efficient methods when determining if data needs to be loaded
#11294 Remove some unused require
statements, used when loading fake workers, in non-PRODUCTION
mode
#11290 [MessageHandler] Re-factor and convert the code to a proper class
#11301 Ensure that the peekByte
methods, on the various Streams, handles end of data correctly (PR 5286 follow-up)
#11296 Allow skipping of errors when parsing broken/unsupported ColorSpaces (issue 6707, issue 11287)
#11302 Slightly re-factor setting of the link target
in addLinkAttributes
#11304 Re-factor the ObjectLoader._walk
method to be properly asynchronous
#11307 Support UTF-16 little-endian strings in the stringToPDFString
helper function (bug 1593902)
#11308 Prevent browser exceptions from incorrectly triggering the assert
in PDFPageProxy._abortOperatorList
(PR 11069 follow-up)
#11312 Convert Catalog.getPageDict
to an async
method
#11314 Revert "Convert Catalog.getPageDict
to an async
method"
#11313 Ensure that Popup annotations, where the parent annotation is a polyline, will always be possible to open/close (issue 11122)
#11305 Fix nodejs core module : ignore url module for web browser
#11315 Include a reduced test case for annotations without a Border
/BS
entry (PR 6180 follow-up)
#11300 Simplifies code contributions by automating the dev setup
#11316 Convert globalScope
and isNodeJS
to proper modules
#11318 [PDFHistory] Move the IE11 pushState
/replaceState
work-around to src/shared/compatibility.js
(PR 10461 follow-up)
#11317 Update npm packages
#11334 Use getBytes
, rather than looping over getByte
, in FlateStream.prototype.readBlock
#11335 Subtract stream.start
when getting the startXRef
property for documents with a Linearization dictionary (issue 11330)
#11346 Ensure that attempting to print with disableAutoFetch
set will fail gracefully (issue 11339)
#11338 Reduce duplication when registering event listeners for the Toolbar
buttons, and other small clean-up
#11350 Convert {BaseViewer, PDFThumbnailViewer}._pagesRequests
from an Array to a WeakMap
#11353 Remove document.attachEvent
code from web/pdf_print_service.js
since it's only necessary for old IE versions
#11325 Added custom file transform function
#11354 Enable the getter-return
, no-dupe-else-if
, and no-setter-return
ESLint rules
#11356 Remove outdated, and misleading, JSDoc comment from the PDFDocument
class
#11363 Remove the Number.isInteger
checks from XRef.fetchUncompressed
(PR 8857 follow-up)
#11370 Stop caching Streams in XRef.fetchCompressed
#11373 Slightly simplify the XRef cache lookup in XRef.fetch
#11374 Set the first pdfPage
immediately in {BaseViewer, PDFThumbnailViewer}.setDocument
#11382 Fix an incorrect condition in BaseViewer.isPageVisible
(PR 10217 follow-up)
#11388 Remove the viewer
option from the PDFPresentationMode
constructor
#11390 Ensure that PDFDocument.checkFirstPage
waits for cleanup to complete (PR 10392 follow-up)
#11391 [api-minor] Replace globalScope
with the standard globalThis
property instead
#11387 Handle corrupt ASCII85Decode inline images with truncated EOD markers (issue 11385)
#11398 Attempt to improve the PDFDocument
error message for empty files (issue 5887)
#11404 [api-minor] Move the ReadableStream
polyfill to the global scope
#11407 Bump npm from 6.13.0 to 6.13.4
#11406 Re-factor the find
helper function, in src/core/document.js
, to search through the raw bytes rather than a string
#11380 Add a reset
method to the PDFHistory
implementation
#11413 Re-factor the npm test
command, used by Travis, to avoid running the 'default_preferences' tasks concurrently (issue 10732)
#11415 Update npm
packages and l10n files
#11418 [api-minor] Simplify the fallback fake worker loader code in src/display/api.js
#11422 Use the strict
mode assert
in the pdf2png Node.js example (issue 10768)
#11425 Use const in viewer_compatibility.js
#11426 Use const in viewer.js
#11427 Use const in view_history.js
#11428 Use const in ui_utils.js
#11429 Use const in toolbar.js
#11436 Update webpack-stream to fix vulnerabiliy reported by npm and dedupe Webpack
#11440 Tweak the "gets page stats after rendering page, with pdfBug
set" unit-test to remove an intermittent failure on Travis
#11437 Extract & use createHeaders helper
#11431 Use const in secondary_toolbar.js
#11430 Use const in text_layer_builder.js
#11433 Use const in pdf_thumbnail_viewer.js
#11432 Use const in preferences.js
#11423 Ignore Metadata entries with incorrectly encoded characters, when setting the viewer title (bug 1605526)
#11443 Support OpenAction dictionaries without Type
entries when parsing Print
actions (issue 11442)
#11446 Enable auto-formatting of the entire code-base using Prettier (issue 11444)
#11445 Include a unit test for OpenAction dictionaries without Type
entries (PR 11443 follow-up)
#11449 Move the regular expression, used with auto printing in the viewer, to web/ui_utils.js
and also use it in the API unit-tests
#11450 Enable the ESLint prefer-const
rule in the web/
directory
#11454 Move the SegoeUISymbol font to the getNonStdFontMap
(PR 8698 follow-up)
#11455 Update npm
packages and l10n files
#11447 Convert all non-RGBA colors to RGBA colors
#11463 [Firefox] Ensure that telemetry will be correctly recorded even when the PDF header is missing (bug 1606566)
#11472 Update the year in the license_header
files
#11466 [Firefox] Slightly simplify how the generator is determined, when sending telemetry data from the viewer
#11474 [api-minor] Remove the Webpack-only npm dependencies from pdfjs-dist
(PR 11418 follow-up)
#11465 Ensure that all import
and require
statements, in the entire code-base, have a .js
file extension
#11488 Enable the no-nested-ternary
ESLint rule in the web/
directory
#11505 Enable the ESLint no-unneeded-ternary
rule
#11504 Add direction: ltr;
to the canvases used in examples/learning
, to ensure correct text rendering (issue 11457)
#11503 Remove the unused id
properties from page and thumbnail canvas/image DOM elements (issue 11499)
#11520 Update the GlobalWorkerOptions.workerSrc
JSDoc comment
#11521 Remove the supportsDocumentColors
warning in MOZCENTRAL builds (bug 844349 follow-up)
#11519 Enable import/extensions of ESlint plugin to enforce all import
have a .js
file extension.
#11522 Ensure that the viewer telemetry reporting, and fallback code, runs in development mode and GENERIC builds
#11510 Skip failing FBF tests in Google Chrome when running makeref
on the bots
#11529 Display the CSS tab in the interactive examples (issue 11506 follow-up)
#11502 Fix a couple of cases where Prettier broke existing formatting (PR 11446 follow-up)
#11511 Enable the no-nested-ternary
ESLint rule (PR 11488 follow-up)
#11497 Add support for Promise.allSettled
#11533 Remove the "useOnlyCssZoom" (debugging) hash parameter
#11489 Remove the FIREFOX
build flag, since it's completely unused and simplify a couple of PDFJSDev
checks
#11534 Enable the ESLint prefer-const
rule globally (PR 11450 follow-up)
#11515 Cache the fallback font dictionary on the PartialEvaluator
(PR 11218 follow-up)
#11482 Convert src/core/jpg.js
to use the readUint16
helper function in src/core/core_utils.js
, rather than re-implementing it twice
#11535 Render Popup annotations last, once all other annotations have been rendered (issue 11362)
#11508 Simplify the handling of unsupported/incorrect markers in src/core/jpg.js
#11537 Send the verbosity
level when setting up fake workers (issue 11536)
#11544 Make the decodeHuffman
function, in src/core/jpg.js
, slightly more efficient
#11545 Use the native URL.createObjectURL
method in web/debugger.js
#11542 Add a README file to the /lib
folder in pdfjs-dist
(issue 11539)
#11546 Fix the indices of arguments for RadialAxial. It is related to #10646.
#11558 Remove the eslint-disable no-var
rule from the web/grab_to_pan.js
file
#11554 Update npm
packages
#11528 Hide .notdef glyphs in non-embedded Type1 fonts and don't ignore Widths
#11559 Fix how curveTo2 (v operator) is translated to SVG
#11567 Add support for CSS variables using the PostCSS CSS Variables
package (issue 11462)
#11569 Replace most remaining Element.setAttribute("style", ...)
usage with Element.style = ...
instead
#11570 Re-factor Toolbar._adjustScaleWidth
to improve/simplify how the zoom dropdown width is calculated
#11573 [api-minor] Change PDFDocumentProxy.cleanup
/PDFPageProxy.cleanup
to return data
#11557 Avoid re-calculating the xScaleBlockOffset
when not necessary in JpegImage._getLinearizedBlockData
#11547 Use fewer multiplications in JpegImage._convertCmykToRgb
#11568 Ensure that the PDF header contains an actual number (PR 11463 follow-up)
#11551 Allow skipping of errors when reading broken/corrupt ToUnicode data (issue 11549)
#11579 Ignore spaces when normalizing the font name in Font.fallbackToSystemFont
(issue 11578)
#11582 [api-minor] Ensure that the Array.prototype
doesn't contain any enumerable properties
#11586 [TextLayer] Immediately set the padding, rather than checking if it's empty, in expandTextDivs
#11593 Remove LoopbackPort.postMessage
special-case for polyfilled TypedArray
s
#11596 Re-factor how Metadata
class instances store its data internally
#11241 [api-minor] Produce non-translated/non-polyfilled builds by default
#11598 Add polyfills to support iteration of Map
and Set
#11603 Enable the no-buffer-constructor
ESLint rule
#11604 Enable the unicorn/prefer-starts-ends-with
ESLint plugin rule
#11602 Move validation of chromium/preferences_schema.json
to its own gulp task
#11605 Update gulp lint
to support passing of the --fix
argument on the command line
#11616 Update the PDF.js web page to link to both versions of the demo viewer (PR 11241 follow-up)
#11607 Add a PDFViewerApplication.initializedPromise
property to allow (easier) tracking of when the default viewer has been initialized
#11620 Remove the unused thisArg
from RefSetCache.forEach
#11621 Update packages and translations
#11623 Use the ESLint no-restricted-syntax
rule to prevent direct usage of new Cmd()
/new Name()
/new Ref()
#11625 Use the same non-embedded Wingdings fallback for fonts named "Wingdings-Regular" too (PR 5463 follow-up, issue 11451)
#11630 Attempt to clarify, and improve the wording of, the Gitpod section of the README
#11540 Fix text spacing with vertical fonts. #7687 and #11526.
#11608 Add a ignoreDestinationZoom
option/preference to allow users to preserve the current zoom level when navigating to internal destinations (issue 5064, 11606)
#11577 Prevent circular references in the /Pages tree
#11590 Update links from IRC to Riot.
#11556 Fix the vertical writing mode with horizontal scaling. #11555.
#11654 Simplify the BaseFontLoader.isFontLoadingAPISupported
getter
#11631 [api-minor] Deprecate getGlobalEventBus
and update the "viewer components" examples accordingly
#11660 Fix Type1 font parsing when .notdef is not at index zero
#11653 Ensure that there's always a setFont (Tf) operator before text rendering operators (issue 11651)
#11664 Prevent the zoom dropdown icon from being overridden when the element is :active
(bug 1619595)
#11671 Update packages and translations
#11672 Slightly simplify the lookup of data in Dict.{get, getAsync, has}
#11673 Update the FontLoader.bind
method to avoid explicitly returning undefined
#11667 Add a deprecation warning for the eventBusDispatchToDOM
option/preference (PR 11631 follow-up)
#11523 Add a heuristic, in src/core/jpg.js
, to handle JPEG images with a wildly incorrect SOF (Start of Frame) scanLines
parameter (issue 10880)
#11675 Fix typo in comment
#11676 Slightly improve the BaseViewer.{firstPagePromise, onePageRendered, pagesPromise}
functionality
#11680 Prevent lookup errors in PartialEvaluator.hasBlendModes
from breaking all parsing/rendering of a page (issue 11678)
#11690 Remove transition effects from toolbar buttons/fields
#11686 Magnifier positioning in reftest analyzer
#11692 Move IsLittleEndianCached
/IsEvalSupportedCached
to src/shared/util.js
, and rename the isSpace
helper function to isWhiteSpace
#11695 Remove variable shadowing from the JavaScript files in the web/
folder
#11699 Bump acorn from 6.4.0 to 6.4.1
#11644 [api-minor] Add more general OpenAction support (PR 10334 follow-up, issue 11642)
#11553 Fix the horizontal scaling of texts with SVG backend. #10988
#11698 Don't accidentally accept invalid glyphNames which appear to follow the Cdd{d}/cdd{d} format in PartialEvaluator._buildSimpleFontToUnicode
(issue 11697)
#11700 Ensure that the JavaScript-warning is always displayed, in the viewer, regardless of browser printing support
#11706 Move the webViewerOpenFile
function, and the "openfile" eventBus listener, since they only matter in GENERIC builds of the default viewer
#11714 Enable the prefer-exponentiation-operator
ESLint rule
#11711 Update packages and translations
#11716 [api-minor] Change the pageIndex, on PDFPageProxy
instances, to a private property