PDF.js v1.9.426 Release Notes

Release Date: 2017-08-14 // over 6 years ago
  • ๐Ÿ”„ Changes:

    #8281 v1.8.188
    ๐Ÿšš #8131 ES6 modules: remove UMD header validation
    #8240 [api-minor] Always allow e.g. rendering to continue even if there are errors, and add a stopAtErrors parameter to getDocument to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815)
    ๐ŸŒ #8203 Convert the files in the /web folder to ES6 modules
    ๐Ÿ“ฆ #8286 Changing package.json version to 1.0.0
    ๐Ÿšš #8283 Moves Uint32ArrayView and hasCanvasTypedArrays into compatibility.js.
    #8285 Change amd to cjs path in ES6 modules
    #8287 Allow to convert (some of) ES6 code to ES5.
    ๐Ÿšš #8289 Firefox extension: remove unused preference cleanup from bootstrap.js
    ๐Ÿšš #8288 Moves 'web' target to the gulpfile.
    #8291 Ensure that PDFThumbnailView.draw is able to handle RenderingCancelledException correctly (PR 8157 follow-up)
    #8293 Convert the password prompt to ES6 syntax
    ๐ŸŒ #8295 Use createPromiseCapability in /web files and avoid unnecessary PDFPageView.setPdfPage calls
    #8294 Convert the files in the /src/display folder to ES6 modules
    #8296 Convert the document properties to ES6 syntax
    #8297 Convert the find bar to ES6 syntax
    ๐ŸŒ #8299 Import getGlobalEventBus correctly from web/dom_events.js in various /web files, to un-break e.g. the viewer components (PR 8203 follow-up)
    ๐Ÿ”จ #8300 Refactor the DownloadManager initialization in GENERIC/CHROME builds again (PR 8203 follow-up)
    ๐Ÿšš #8311 [Firefox addon] Upstream changes from: Bug 1356569 - Remove optional trailing parameters (issue 8310)
    ๐Ÿšš #8312 Moves dist and minifiedpost tragets from make.js.
    ๐Ÿšš #8315 Remove the signchromium target from make.js
    #8313 [Firefox addon] Upstream changes from: Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales
    ๐ŸŽ #8321 Change getPDFFileNameFromURL to ignore data: URLs for performance reasons (issue 8263)
    ๐Ÿ”จ #8322 [Firefox addon] Remove the window.FirefoxCom hack from web/viewer.js, since it was made redunant by the setExternalLocalizerServices refactoring (PR 7202 follow-up)
    ๐Ÿšš #8323 Change the importl10n script to use the Beta channel, since Aurora is being removed
    #8302 Convert the attachments/outline view to ES6 syntax
    #8306 Convert the sidebar to ES6 syntax
    #8303 Convert the Preferences to an ES6 class
    ๐Ÿšš #8328 Makefile: remove unused mozcentralcheck target
    #8339 Convert the ViewHistory to an ES6 class, and re-factor it to make it properly asynchronous
    โœ… #8331 Enable running the ui_utils unit-tests on Travis
    ๐Ÿ— #8324 Convert the annotation layer builder, presentation mode and rendering queue to ES6 syntax
    ๐Ÿ‘• #8332 Enable the object-shorthand ESLint rule in src/shared and src/display
    โœ… #8345 Bots: disable the default browser test and enable E10s
    โช #8346 Restore the URL.createObjectURL check to the createObjectURL utility function (issue 8344)
    #8348 Add the commit hash to the README.mozilla file (issue 8347)
    #8309 Allow use versions for pdf.js script (i.e. - pdf.js?2412313)
    ๐Ÿ— #8352 Removes builder.build().
    #8335 Subtract the X/Y offsets when decoding refinement regions of JBIG2 images (issue 7145, 7308, 7401, 7850, 8270)
    ๐Ÿ‘• #8351 Enable the object-shorthand ESLint rule in web
    ๐Ÿ‘• #8342 Enable the object-shorthand ESLint rule in src/core
    โœ… #8298 Convert the files in the /test/unit folder to ES6 modules
    #8354 [Firefox addon] Replace a bind(this) statement with an arrow function in PdfStreamConverter.jsm (issue 8343)
    ๐Ÿ‘• #8353 Enable the object-shorthand ESLint rule
    #8355 Replace unnecessary bind(this) and var self = this statements with arrow functions in src/core/evaluator.js
    #8349 Migrate make.js to gulpfile.js
    #8357 Replace unnecessary bind(this) and var self = this statements with arrow functions in remaining src/core/ files
    #8361 Export LoopbackPort
    ๐Ÿ‘ท #8363 Adds initializeFromPort to the WorkerMessageHandler.
    #8364 Adds babel caching for system.js.
    #8359 Ignore line-breaks between operator and digit in Lexer.getNumber
    0๏ธโƒฃ #8369 Add no-default-browser-check to chrome runner.
    #8370 Replace unnecessary bind(this) and var self = this statements with arrow functions in remaining src/ files
    #8358 Change the signatures of the PartialEvaluator "constructor" and its getOperatorList/getTextContent methods to take parameter objects
    ๐ŸŒ #8377 Replace unnecessary bind(this) statements with arrow functions in web/ files
    #8378 Convert the files in the /src/shared folder to ES6 modules
    #8340 Fix char spacing bug in SVG mode
    #8368 Enables source maps for webpack generated files.
    #8385 Fix typo in LoopbackPort export
    #8381 Re-factor PDFDocumentProperties such that it's properly reset when a new PDF file is opened (issue 8371)
    #8387 amends Babel cache (#8364) implementation to also work on Safari
    #8390 Upstream changes from: Bug 1319111 - Expose result principal URL ("final channel URL") on LoadInfo, convert current consumers of LOAD_REPLACE
    ๐ŸŒ #8393 Replace unnecessary var self = this statements with arrow functions in web/app.js
    #8391 Convert the hand tool, interfaces and secondary toolbar to ES6 syntax
    #8350 [api-minor] Fix svg image render
    #8397 Simplify extractText, and replace unnecessary var self = this statements with arrow functions, in web/pdf_find_controller.js
    โœ… #8399 Wait until PDFDocumentLoadingTask.destroy is resolved before calling done in the API unit-tests
    โœ… #8400 Wait for previous pdfDocument(s) to be destroyed before running the next reference test
    #8398 Convert the DOMCMapReaderFactory and DOMCanvasFactory to ES6 classes
    โœ… #8258 Enable running a subset of the API unit-tests on Travis
    ๐Ÿ”Œ #8406 Gracefully ignore transaction failure in plugin-babel-cached
    #8411 Replace unnecessary var self = this statements with arrow functions in web/pdf_page_view.js and web/pdf_thumbnail_view.js
    ๐Ÿ‘• #8417 Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file.
    #8413 [api-minor] Adds additional parameter so background color of canvas can be set
    #8388 Cache JPEG images, just as we do for other image formats, in evaluator.js (issue 8380)
    โช #8420 Revert "Upstream changes from: Bug 1319111 - Expose result principal URL ("final channel URL") on LoadInfo, convert current consumers of LOAD_REPLACE"
    #8421 Change the importl10n script to use the Nightly channel
    ๐Ÿšš #8366 Removes shelljs
    ๐Ÿ“„ #8431 Replace a couple of leftover make.js references with gulpfile.js in docs/comments
    #7635 Unify handling of various cursor tools, e.g. the current Hand Tool and a possible future Zoom Tool, in a new PDFCursorTools module
    ๐Ÿšš #8432 Remove the special handling for nameddests that look like standard pageNumbers
    ๐Ÿ— #8433 Remove the reference to compatibility.js from the README, since it's included by default in GENERIC builds
    #8436 Don't map glyphs to the HANGUL FILLER (0x3164) Unicode location (issue 8424)
    0๏ธโƒฃ #8437 Resets canvas 2d context to the default state.
    #8442 Add different code-paths to {CMap, ToUnicodeMap}.charCodeOf depending on length, since Array.prototype.indexOf can be extremely inefficient for very large arrays (issue 8372)
    ๐Ÿ”จ #8416 Refactor and ES6-ify PDFLinkService.navigateTo
    โšก๏ธ #8452 Update webpack.js to support browsers that do not have the Web Workers API
    #8450 Convert the overlay manager to ES6 syntax
    #8284 Convert the files in the /src/core folder to ES6 modules
    #8455 Convert the page view to ES6 syntax
    #8458 Refactor the getTempCanvas function in pdf_thumbnail_view.js to a factory, in preparation for ES6 conversion of the thumbnail related code
    ๐Ÿšš #8462 Removes last UMDs from the modules.
    ๐Ÿ— #8463 Allow specifying the PDFJS_NEXT build flag via an environment variable when running the various gulp commands
    #8396 Adds streams-lib polyfill and exports ReadableStream from shared/util.
    #8394 Wraps mozL10n to async calls; splits firefox and generic l10n libs.
    0๏ธโƒฃ #8466 Add a stub createL10n to DefaultExternalServices in app.js
    ๐Ÿ‘• #8470 Fix inconsistent spacing and trailing commas in objects in extensions/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on
    ๐Ÿ‘• #8469 Fix inconsistent spacing and trailing commas in objects in web/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on
    ๐Ÿ‘• #8477 Fix inconsistent spacing and trailing commas in objects in test/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on
    ๐Ÿ‘• #8475 Fix inconsistent spacing and trailing commas in objects in remaining src/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on
    ๐Ÿ‘• #8474 Fix inconsistent spacing and trailing commas in objects in src/core/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on
    ๐Ÿ‘• #8478 Fix the remaining cases of inconsistent spacing and trailing commas in objects, and enable the comma-dangle and object-curly-spacing ESLint rules
    #8482 Convert the thumbnail view/viewer to ES6 syntax
    #8483 Convert the find controller to ES6 syntax
    #8467 Bug 1353029 - Pass PdfJs.enabled into child on change.
    #8499 Prevent console errors when clicking to change page while in Presentation Mode (issue 8498)
    #8430 Adds sendWithStream method in MessageHandler.
    #8441 Ensure that TilingPatterns have valid (non-zero) /BBox arrays (issue 8330)
    ๐Ÿ‘ท #8508 Fixes duplicate creation of PDFWorker for the same port.
    #8510 Prevent the Zoom dropdown from intermittently displaying an incorrect custom scale in Firefox (PR 8394 follow-up)
    #8517 Additional check in globalScope detections
    ๐Ÿ“ฆ #8401 Adds gulp dist-install command; using pdfjs-dist package in examples.
    #8519 Preventing from using the same canvas for multiple render()
    ๐Ÿ‘ท #8522 Fixes WeakMap polyfill (and improves PDFWorker port check).
    โšก๏ธ #8531 Remove PDFPageView.updatePosition since it's not actually necessary
    #8515 Adds special case for origin of blob to the compatibility URL.
    ๐ŸŒ #8525 Allow for unbinding of events in web application
    #8535 Reset pageRotation and downloadComplete in PDFViewerApplication.close
    ๐Ÿšš #8539 Remove a redundant PDFViewer.currentScale call from PDFViewerApplication.load
    ๐Ÿ”จ #8536 Refactor ObjectLoader to use Dicts correctly, rather than abusing their internal properties
    #8543 Add getAttributeNS to domstubs for SVG example
    #8544 compatibility.js: Rename parameters in JURL
    #8537 Convert the toolbar to ES6 syntax
    #8540 Reduce memory requirements of pdf2svg.js example to avoid OOM
    #8552 Ensure canvas is really hidden when used with pdfjs-dist.
    #8556 Stop tracking the rotation in PDFViewerApplication and directly use PDFViewer.pagesRotation instead
    ๐Ÿšš #8542 Move svg:clipPath generation from clip to endPath
    โšก๏ธ #8561 Don't use a hidden canvas when constructing the zoomLayer in PDFPageView.update
    #8567 Fix error when using custom CMapReaderFactory
    #8488 Streams get text content
    0๏ธโƒฃ #8507 Only special-case OpenType fonts with CFF data if it's both a composite (i.e. Type0) font and also has a non-default CID to GID map (issue 8480)
    0๏ธโƒฃ #8571 Mention in the "Getting the Code" section of README.md that an ES6 compatible browser is required when using the default viewer with gulp server
    #8564 SVG: implement fill and stroke opacity
    โšก๏ธ #8576 Remove the selectScaleOption helper function, in Toolbar._updateUIState, and simply inline its code instead
    ๐Ÿšš #8574 SVG: move setting the stroke properties to the stroke method
    ๐ŸŒ #8578 ES6-ify the code in web/ui_utils.js
    #8589 Fix missing notdef in expert encoding.
    ๐Ÿ— #8582 Convert the text layer builder to ES6 syntax
    ๐ŸŒ #8583 ES6-ify the code in web/app.js and web/viewer.js
    ๐Ÿ‘ท #8585 Check that the MessageHandler isn't already terminated in the onFailure handler in src/core/worker.js (issue 8584)
    #8592 Only mask char codes of (3, 0) cmap tables in the range of 0xF000 to 0โ€ฆ
    ๐ŸŒ #8594 Change var to let, and use object destructuring, in a couple of previously class converted web/*.js files
    #8580 Fix how we detect and handle missing glyph data.
    ๐Ÿ›  #8596 Fixes wrong structure of fullReader.read() result.
    ๐Ÿ“œ #8615 Fix a stupid spelling error in the ASCII85Decode name in Parser.makeInlineImage (issue 8613)
    #8555 Don't allow setting various properties, such as currentPageNumber/currentScale/currentScaleValue/pagesRotation, before {PDFViewer, PDFThumbnailViewer}.setDocument has been called
    ๐Ÿ‘• #8621 Bump minimum eslint version to 3.19.0
    ๐Ÿšš #8581 Removes error()
    #8630 Remove pdfjsdev_webpack , use webpack options
    #8643 Add Number.isNaN and Number.isInteger polyfills in compatibility.js, since the Streams polyfill relies on them
    ๐Ÿ›  #8646 Fixes pdf.js library source detection.
    #8640 Check for undefined
    #8609 Ensure that PDFFindBar._adjustWidth is called in all situations where the width of the findbar might have changed
    โšก๏ธ #8634 Update inconsistent names
    ๐Ÿšš #8618 Remove the scale-not-initialized hack from webViewerResize (in app.js)
    โšก๏ธ #8641 Update ESLint (and eslint-plugin-mozilla) to the latest version
    #8620 Improve compression of PNG images embedded in generated SVG files
    #8649 Convert PDFLinkService to an ES6 class
    #8651 Fix display_svg_spec tests.
    #8636 Convert PDFViewer to an ES6 class
    ๐Ÿ’ป #8653 Add UI for the cursorToolOnLoad pref in the Chrome extension + migration logic
    #8678 Fix a typo, in the Catalog.numPages getter, than prevents shadowing from working correctly
    #8638 In src/core/jpg.js, ensure that the Adobe JPEG marker always takes precedence, even when the color transform code is zero
    ๐Ÿšš #8684 Remove most assert() calls (issue 8506)
    ๐Ÿ‘ #8673 [api-minor] Add support for PageMode in the API and viewer (issue 8657)
    โšก๏ธ #8689 Update README.md
    โœ… #8692 Add a reduced test-case for issue 7696
    #8696 Adds ready capability rejection logic for stream sink.
    #8666 Fix TypeError that occurs in colorspace.js on accidentally passing an 'Array' instead of 'TypedArray'
    #8698 Add a fallback for non-embedded SegoeUISymbol font (issue 8697)
    ๐Ÿ‘ #8617 Adds Streams API support for networking task of PDF.js project.
    #8715 Use streams-lib as polyfill
    โœ… #8611 Add unit-tests for colorspace.js
    ๐Ÿšš #8717 Move the XRefMock in the unit tests to a central location
    #8718 Ensure that the loadingBar isn't displayed again when the entire file has already been fetched
    #8722 Fix the helloworld example by importing the network.js file (PR 8617 follow-up)
    #8721 Reduces the amount of data send via GetDocRequest.
    #8627 Fallback on font widths if CFF data is broken
    #8681 Fix several issues with glyph id mappings (issue 8668, bug 1383504)
    ๐Ÿ‘ #8744 Checks Edge support for streams.
    ๐Ÿ‘ท #8738 Delete workerPort to PDFWorker cache after PDFWorker destroy
    #8745 Properly cancel streams and guard at getTextContent.
    #8747 Fix two cmap related issues.
    #8746 More robust getPage() error handling.
    ๐ŸŒ #8752 ES6-ify the code in web/dom_events.js
    ๐Ÿšš #8756 Remove leftover args[0].code checks from the OPS.paintXObject cases in evaluator.js
    #8761 Fallback to plain object for globalScope.
    ๐Ÿ— #8762 Replace the coded property with isType3Font when building the font properties object in PartialEvaluator.translateFont
    #8764 Convert DownloadManager to an ES6 class
    #8749 Version 1.9