PDF.js v2.5.207 Release Notes

Release Date: 2020-06-01 // almost 4 years ago
  • ๐Ÿš€ This release features performance improvements thanks to improved image caching and JPEG decoding.

    ๐Ÿ”„ Changes since v2.4.456:

    ๐Ÿš€ #11717 Bump versions in pdfjs.config and update the getting started page of the website for the new release
    ๐Ÿšš #11719 Remove the unused wideChars property on Font instances
    โšก๏ธ #11720 Update the eslint-plugin-no-unsanitized package to the latest version
    โšก๏ธ #11721 Don't let Travis run npm update during setup
    ๐Ÿšš #11728 Remove unnecessary checks from the PDFDocumentProperties constructor
    ๐Ÿ— #11724 Only build the necessary web/ files during the gulp default_preferences task
    ๐Ÿšš #11723 Remove variable shadowing from the JavaScript files in the src/display/ folder
    #11725 Re-factor PDFViewerApplication.load such that {PDFViewer, PDFThumbnailViewer}.setDocument happens slightly earlier
    ๐Ÿšš #11734 Remove old API methods which were previously converted to throwing (PR 11219 follow-up)
    #11736 Add passive: false to the wheel event listener used in PDFPresentationMode (issue 11735, PR 10765 follow-up)
    ๐Ÿšš #11742 Remove variable shadowing from the JavaScript files in the test/unit/ folder
    ๐Ÿšš #11738 Remove variable shadowing from the JavaScript files in the src/core/ folder
    #11707 Always prefer the PDF.js JPEG decoder for very large images, in order to reduce peak memory usage (issue 11694)
    #11744 The first glyph in CFF CIDFonts must be named 0 instead of ".notdef"
    ๐Ÿ–จ #11646 Ensure that automatic printing still works when the viewer and/or its pages are hidden (bug 1618621, bug 1618955)
    #11747 Add passive: false when removing wheel listeners
    ๐Ÿ‘• #11745 Enable the ESLint no-shadow rule
    ๐Ÿšš #11755 Remove the unused sizes and encoding properties on Font instances
    #11767 Replace the RTL images with CSS transforms of the standard images (issue 11766)
    ๐Ÿšš #11655 [api-minor] Remove the getGlobalEventBus viewer functionality, and the eventBusDispatchToDOM option/preference (PR 11631 follow-up)
    ๐Ÿ— #11771 Fail early, in modern GENERIC builds, if certain required browser functionality is missing (issue 11762)
    โšก๏ธ #11772 Update packages and translations
    #11769 Ensure that Font.charToGlyph won't fail because String.fromCodePoint is given an invalid code point (issue 11768)
    โšก๏ธ #11781 Update the "gulp jsdoc" task to account for API changes in the mkdirp package (PR 11772 follow-up)
    ๐Ÿ“‡ #11780 Move the initialization of "page labels"/"metadata"/"auto print" out of PDFViewerApplication.load
    #11773 [api-minor] Change Font.exportData to use an explicit white-list of exportable properties, and stop exporting internal/unused properties
    0๏ธโƒฃ #11777 [api-minor] Change Font.exportData to, by default, stop exporting properties which are completely unused on the main-thread and/or in the API (PR 11773 follow-up)
    #11746 Create the glyph mapping correctly for composite Type1, i.e. CIDFontType0, fonts (issue 11740)
    #11727 Add a heuristic to scale even single-char text, when the horizontal/vertical scaling differs significantly (issue 11713)
    0๏ธโƒฃ #11789 Add a new pdfjs.enablePermissions preference, off by default, to allow the PDF documents to disable copying in the viewer (bug 792816)
    #11797 Don't bundle the fallback grab/grabbing cursor images when running gulp mozcentral
    ๐Ÿ— #11799 Fail early, in modern GENERIC builds, if certain required browser functionality is missing (PR 11771 follow-up)
    ๐Ÿšš #11800 Remove any mention of Gitpod from the README (issue 11732)
    โšก๏ธ #11809 Update Prettier to version 2.0
    #11806 [api-minor] Fix the return value of PDFDocumentProxy.getViewerPreferences when no viewer preferences are present (PR 10738 follow-up)
    #11810 A couple of small String.fromCodePoint improvements (PR 11698 and 11769 follow-up)
    #11805 Always skip over any additional, unexpected, RSTx (restart) markers in corrupt JPEG images (issue 11794)
    ๐Ÿ’ป #11813 Suppress browser autofill on page number
    ๐Ÿ“„ #11821 docs: Fix simple typo, occurences -> occurrences
    ๐Ÿšš #11819 [src/core/jpg.js] Remove redundant marker validation at the end of the decodeScan function (PR 11805 follow-up)
    ๐Ÿ‘• #11818 Enable the dot-notation ESLint rule
    ๐Ÿ‘ #11814 Support the vertical writing mode with SVG backend.
    โšก๏ธ #11822 Update packages and translations
    ๐Ÿ— #11826 Change the "download" keyboard shortcut (Ctrl+S) handling, in GENERIC/CHROME builds, to utilize the EventBus (issue 11657); add a new "openfile" keyboard shortcut (Ctrl+O), in GENERIC builds
    #11823 [src/core/fonts.js] Improve the validateOS2Table function and other code
    ๐Ÿ— #11825 Avoid reading the "disablePreferences"/"locale" options, when initializing the viewer, in extension builds
    ๐Ÿš€ #11831 Use Node LTS releases to fix Travis CI builds (issue 10790)
    #11835 [api-minor] Change PageViewport to throw when the rotation is not a multiple of 90 degrees
    #11837 Always attempt to dispatch the "webviewerloaded" event at the embedding document (PR 10318 follow-up, issue 11829)
    ๐Ÿš€ #11844 [api-minor] Immediately release the font.data property once the font been attached to the DOM (PR 11777 follow-up)
    ๐ŸŒ #11845 Use the native URL.createObjectURL method more in the web/ folder
    ๐Ÿšš #11847 Move the maybeValidDimensions check, used with JPEG images, to occur earlier (PR 11523 follow-up)
    โœ… #11807 Introduce Puppeteer for handling browsers during tests
    #11853 Include the name for interactive form elements
    ๐ŸŒ #11834 Preserve error types during translation
    ๐Ÿšš #11864 Remove the create-react-app example (issue 11729)
    โšก๏ธ #11868 Update packages and translations
    #11869 Various smaller clean-up in gulpfile.js
    ๐Ÿ‘ #11863 Add more categories of unsupported features.
    ๐Ÿ“œ #11872 Gracefully handle annotation parsing errors in Page.getOperatorList (issue 11871)
    ๐Ÿ‘• #11879 Enable the ESLint grouped-accessor-pairs rule
    ๐Ÿ‘• #11873 Use the ESLint no-restricted-syntax rule to ensure that assert is always called with two arguments
    #11880 Attempt to respect the "zoom" hash parameter, even when the "nameddest" parameter is present (issue 11875)
    ๐Ÿ“œ #11889 Handle errors individually for each annotation in the _parsedAnnotations getter
    โšก๏ธ #11890 Update ESLint to version 7
    #11892 Add a minified-es5 gulp task (issue 11858)
    #11905 Reduce the usage of require statements in code-paths not protected by pre-processor and/or run-time checks
    โšก๏ธ #11910 Update packages and translations
    ๐Ÿšš #11911 Remove the SystemJS dependency from the web/preferences.js file
    ๐Ÿ’ป #11917 [Firefox] Allow PDF attachments to, once again, be opened directly in the browser (bug 1632644)
    ๐Ÿ‘ท #11914 Convert the src/pdf.js and src/pdf.worker.js files to use standard import/export statements
    #11919 Reduce usage of SystemJS, in the development viewer, even further
    #11912 Attempt to cache repeated images at the document, rather than the page, level (issue 11878)
    ๐Ÿ‘ท #11924 Avoid hanging the worker-thread for CMap data with ridiculously large ranges (issue 11922)
    ๐Ÿšš #11926 Allow GlobalImageCache.clear to, optionally, only remove the actual data (PR 11912 follow-up)
    #11601 [api-minor] Decode all JPEG images with the built-in PDF.js decoder in src/core/jpg.js
    #11927 Implement fill opacity for shading patterns in the SVG back-end
    โšก๏ธ #11939 Update Acorn to version 7
    #11940 Add comments to the export list in the src/pdf.js file (PR 11914 follow-up)
    #11930 Improve the local image caching in PartialEvaluator.getOperatorList
    ๐Ÿ— #11943 Remove unused code from the external/builder/builder.js file
    โšก๏ธ #11945 Update packages and translations
    #11947 Ensure that that we don't attempt to cache inline images in the GlobalImageCache (PR 11912 follow-up)