v2.1.266
Changes since v2.0.943:
#10187 Bump versions in pdfjs.config
#10188 Hide the beta version button on the website if there is only a stable version
#10162 Normalize BBox of form XObjects in SVG back-end
#10185 Reduce the number of redundant text normalization operations in PDFFindController
#10182 Small clean-up of the search related methods in TextLayerBuilder
#10184 Ensure that matches are not scrolled into after the findbar has been closed (PR 10100 follow-up)
#10196 [Regression] Ensure that "Highlight All" is propagated to all pages for 'findagain' events where the findbar was previously closed (PR 10100 follow-up)
#10190 Add a helper method for _getVisiblePages
, in BaseViewer
, for the case where only a single page is displayed in the viewer
#10201 Reduce the number of redundant updatetextlayermatches
events dispatched when calculating matches in PDFFindController
#10203 Change canvasInRendering
to a WeakSet
instead of a WeakMap
#10096 Remove the attachDOMEventsToEventBus
functionality, since EventBus
instances are able to re-dispatch events to the DOM (PR 10019, bug 1492849 follow-up)
#10202 Attempt to clean-up/restore pending rendering operations on RenderTask.cancel
(issue 10200)
#10217 For repeated 'findagain' operations, attempt to reset the search position if the user has e.g. scrolled in the document (issue 4141)
#10219 Convert src/core/ps_parser.js
to use ES6 classes
#10228 Don't detect nw.js as node.js
#10233 [api-minor] Convert PDFObjects
, in src/display/api.js
, to an ES6 class
#10238 Move the interface
definitions out of src/core/worker.js
and into their own file
#10245 Update BaseViewer.scrollPageIntoView
to always validate the pageNumber
parameter
#10223 When the search query changes, regardless of the search command, always re-calculate matches (bug 1030622)
#10220 Only scroll search results into view as a result of an actual find operation, and not when the user scrolls/zooms/rotates the document (bug 1237076, issue 6746)
#10231 Stop scrolling the document when "Highlight All" is toggled in the findbar (issue 5561)
#10244 Fix webpack example
#10255 Avoid unnecessary PDFFindController.scrollMatchIntoView
calls in TextLayerBuilder._renderMatches
when highlightAll
is set (PR 10201 follow-up)
#10256 Attempt to tweak the error messages, in BaseViewer
, for invalid pageNumbers/pageLabels (bug 1505824)
#10264 Update translations and packages
#10197 Use span
instead of div
in the text layer
#10246 Convert the remaining code in src/display/api.js
to use ES6 classes
#10274 Fallback to an exhaustive search, in corrupt PDF files, for NameTrees/NumberTrees that are not correctly ordered (issue 10272)
#10294 Add ESLint plugin import to be warned against invalid paths
#10292 Replace uglify-es with Terser
#10293 Upgrade to Babel 7
#10275 Fix NameOrNumberTree.get
to actually perform a binary search to find the requested key
#10299 Update packages and translations
#10300 Include forgotten changes after Wintersmith update
#10318 In GENERIC
builds, dispatch a "webviewerloaded" event (from the webViewerLoad
function) before initializing the viewer
#10322 Remove unuseful variable
#10323 Test the code as-is, in Node.js/Travis, rather than its Babel translated version
#10340 Tweak the PDFHistory._tryPushCurrentPosition
method to work better with the different Scroll/Spread viewer modes
#10330 Handle line width of zero in SVG
#10304 Add protection against directory traversal attacks
#10295 Update eslint-plugin-mozilla to ^1.0.1
#10337 Turn on ESLint in examples
#10351 Attempt to ignore mouse wheel zooming during tab switches (bug 1503412)
#10350 Ignore the fieldValue
for Signature annotations, since they're currently unsupported (issue 10374)
#10354 Disable source-map generation when running tests
#10356 Use high DPI icons on semi-high DPI screens.
#10358 Add keyboard shortcut to toggle sidebar (F4, same as Adobe Reader).
#10266 Upgrade to Gulp 4
#10363 Fix small visual quirk in thumbnail viewer
#10346 [api-minor] Add support, in getMetadata
, for custom information dictionary entries (issue 5970, issue 10344)
#10369 [api-minor] Change the getViewport
method, on PDFPageProxy
, to take a parameter object rather than a bunch of (randomly) ordered parameters
#10375 Update translations and packages
#10334 [api-minor] Add support for OpenAction destinations (issue 10332)
#10378 Update remaining examples, and docs, to utilize current API functionality (issue 10377)
#10376 Convert src/core/chunked_stream.js
to ES6 syntax
#10392 Check that the first page can be successfully loaded, to try and ascertain the validity of the XRef table (issue 7496, issue 10326)
#10394 Optimize the Ref
class in src/core/primitives.js
#10393 Convert src/core/document.js
to ES6 syntax
#10396 Optimizations to avoid intermediate string creation
#10397 Ensure that AnnotationBorderStyle.setWidth
is able to handle the input being a Name
, to correctly deal with corrupt PDF documents (issue 10385)
#10398 Prevent errors in various methods in SimpleDOMNode
when the childNodes
property is not defined (issue 10395)
#10277 Repair CFF fonts if stem hints are in wrong order
#10404 Remove the for ... of
loop from the PDFDocument.fingerprint
getter (issue 10401)
#10399 migrate to canvas 2.x api
#10411 Adjust how AnnotationBorderStyle.setWidth
handles the input being a Name
(issue 10385)
#10408 Prevent errors, because of incorrect scope, in the XMLParserBase._resolveEntities
method (issue 10407)
#10412 Prevent errors, in SimpleXMLParser.onEndElement
, when the stack has already been completely parsed (issue 10410)
#10417 Fix reading number of HTMX metrics.
#10420 Update translations/packages and improve documentation
#10421 Switch to HTTPS for the license link on the website
#10422 Convert more files in src/core
to ES6 syntax
#10424 Accept non-matching document fingerprints, in PDFHistory
, when the viewer is reloaded (issue 6847)
#10423 Add support for updating the document hash, off by default, when the browser history is updated (issue 5753)
#10441 Handle more cases of corrupt PDF files with missing 'endobj' operators, where the "obj" string is immediately followed by the dictionary (PR 9288 follow-up)
#10436 Avoid truncating inline images, where the data and the "EI" marker is glued together (issue 10388)
#10425 Write more unit tests for the find controller
#10444 Remove left-over console log from the find controller unit tests
#10447 Handle malformed URIs as bad requests in the development webserver
#10443 Prevent TypeError: views[index] is undefined
being throw in getVisibleElements
when the viewer, or all pages, are hidden
#10462 Tweak the DOMTokenList.toggle
polyfill (issue 10460)
#10461 Avoid setting incorrect document URLs, in IE 11, when the browser history is updated (PR 10423 follow-up)
#10457 When parsing Metadata, attempt to remove "junk" before the first tag (PR 10398 follow-up)
#10466 Move/refactor the code in the BaseViewer.update
method to reduce duplication in the extending classes
#10467 Convert some usage of indexOf
to startsWith
/includes
where applicable
#10471 Implement a unit test for metadata parsing to ensure that it's not vulnerable to the billion laughs attack
#10470 Try to, completely, avoid loading the ReadableStream
polyfill in MOZCENTRAL builds
#10473 Add an Array.from
polyfill, using core-js, and remove some compatibility hacks from the src/display/content_disposition.js
file
#10474 Update translations and packages
#10480 [Regression] Fix the FontInspector
in the PDFBug debugging tools
#10483 Update the mobile-viewer
example to use the new PDFHistory.initialize
format (PR 10423 follow-up)
#10484 Stop bundling the ReadableStream
polyfill in MOZCENTRAL builds (PR 10470 follow-up)
#10492 Ensure that XRef.indexObjects
can handle object numbers with zero-padding (issue 10491)
#10482 Implement Decode entry in Indexed images
#10494 Reduce unnecessary duplication of the isDefaultDecode
methods on ColorSpace
instances
#10489 Move more code/methods into BaseViewer
, and simplify the PDFSinglePageViewer._scrollIntoView
method slightly
#10501 In getVisibleElements
, check firstVisibleElementInd
rather than numViews
before backtracking (PR 10443 follow-up)
#10499 Attempt to clean-up/restore pending rendering operations when errors occurs while a RenderTask
runs (PR 10202 follow-up)
#10504 Enable the no-useless-catch
ESLint rule
#10508 Do the final text scaling correctly in flushTextContentItem
(issue 8276)
#10515 Add a settled
property, tracking the fulfilled/rejected stated of the Promise, to createPromiseCapability
#10517 [api-minor] Remove the document.currentScript
polyfill
#10502 Modify a number of the viewer preferences, whose current default value is 0
, such that they behave as expected with the view history
#10525 Convert more code to use classList.toggle
with the force
parameter
#10527 Add a polyfill for classList.{add, remove}
with more than one parameter
#10532 Bump base version and version prefix in pdfjs.config
#10533 Bump the version number in pdfjs.config
#10534 Try to hack-around the broken pdfjs-dist
links, such that they will point to the main library releases (issue 10391)
#10530 Fix copying on supplementary plane characters
#10545 Undo the pdfjs.config
version bumps
#10537 Improve unit test coverage
#10540 [Chrome extension] Add missing "type" entry for the viewOnLoad
preference in the preferences_schema.json
file (PR 10502 follow-up)
#10539 [api-minor] Fallback to the built-in font renderer when font loading fails