PDF Reader in JavaScript

Related tags

Files pdf.js

PDF.js Build Status

PDF.js is a Portable Document Format (PDF) viewer that is built with HTML5.

PDF.js is community-driven and supported by Mozilla. Our goal is to create a general-purpose, web standards-based platform for parsing and rendering PDFs.


PDF.js is an open source project and always looking for more contributors. To get involved, visit:

Feel free to stop by our Matrix room for questions or guidance.

Getting Started

Online demo

Please note that the "Modern browsers" version assumes native support for features such as e.g. async/await, ReadableStream, optional chaining, and nullish coalescing.

Browser Extensions


PDF.js is built into version 19+ of Firefox.


  • The official extension for Chrome can be installed from the Chrome Web Store. This extension is maintained by @Rob--W.
  • Build Your Own - Get the code as explained below and issue gulp chromium. Then open Chrome, go to Tools > Extension and load the (unpackaged) extension from the directory build/chromium.

Getting the Code

To get a local copy of the current code, clone it using git:

$ git clone https://github.com/mozilla/pdf.js.git
$ cd pdf.js

Next, install Node.js via the official package or via nvm. You need to install the gulp package globally (see also gulp's getting started):

$ npm install -g gulp-cli

If everything worked out, install all dependencies for PDF.js:

$ npm install

Finally, you need to start a local web server as some browsers do not allow opening PDF files using a file:// URL. Run:

$ gulp server

and then you can open:

Please keep in mind that this requires a modern and fully up-to-date browser; refer to Building PDF.js for non-development usage of the PDF.js library.

It is also possible to view all test PDF files on the right side by opening:

Building PDF.js

In order to bundle all src/ files into two production scripts and build the generic viewer, run:

$ gulp generic

If you need to support older browsers, run:

$ gulp generic-legacy

This will generate pdf.js and pdf.worker.js in the build/generic/build/ directory (respectively build/generic-legacy/build/). Both scripts are needed but only pdf.js needs to be included since pdf.worker.js will be loaded by pdf.js. The PDF.js files are large and should be minified for production.

Using PDF.js in a web application

To use PDF.js in a web application you can choose to use a pre-built version of the library or to build it from source. We supply pre-built versions for usage with NPM and Bower under the pdfjs-dist name. For more information and examples please refer to the wiki page on this subject.

Including via a CDN

PDF.js is hosted on several free CDNs:


You can play with the PDF.js API directly from your browser using the live demos below:

More examples can be found in the examples folder. Some of them are using the pdfjs-dist package, which can be built and installed in this repo directory via gulp dist-install command.

For an introduction to the PDF.js code, check out the presentation by our contributor Julian Viereck:

More learning resources can be found at:

The API documentation can be found at:


Check out our FAQs and get answers to common questions:

Talk to us on Matrix:

File an issue:

Follow us on twitter: @pdfjs

  • Digital signatures in pdf.js

    Digital signatures in pdf.js

    Hi! We are interested about when or if you´re going to implement the Signature Data View (Xades, Pades & Cades) in the PDF viewer (PDF.js)

    Kind Regards

    Alejandro Pinedo, SOA-X

    feature annotations 
    opened by soa-x 197
  • Improved Text Selection By Padding Text Elements

    Improved Text Selection By Padding Text Elements

    The Problem

    Text selection in pdf.js does not work so well. If while dragging, your cursor is not directly on top of a text element, then you get unexpected results. This occurs with nearly all examples, including the tracemonkey example. Try starting a selection, then dragging the mouse to a blank whitespace area beneath the initial selection. You'll see the selection gets reversed. If you keep moving your mouse, it flickers and is generally a horrible experience. I'm not the first to report this, it is the subject of at least #4629 and #4843.

    The Solution

    The reason why selection doesn't work is because most browsers rely on padding between text to detect text flow. The solution, therefore, is to increase padding of each text element so that each element runs right up next to the next element.

    Other Solutions

    Adding padding to each text element was recognized as a possible solution by @mitar in #4843. However, in #4843, the suggested solution was relatively complex, which included modifying the padding dynamically whenever a mouse moves. It was also written in CoffeeScript for a completely separate viewer and porting it seemed difficult.

    This Solution

    In this solution, the padding is calculated when the text elements are added. For each added text element, we find the nearest neighbor to the right that is on the same line. We then set the padding-right of the text element to that distance. Similarly, for padding-bottom we find the next line that is underneath the text element, and set the padding to the difference between lines. Setting padding-bottom is especially helpful for PDFs that are double spaced (lots of space between lines).

    The solution isn't all milk and honey though. The computation is O(N^2), which could be bad for complex PDFs. There are fancier algorithms to find the nearest neighbor, but for now, for each text element, we look at every other text element to see if it's nearest.

    UPDATE: As discussed below, the O(N^2) issue in this pull request has been resolved by using a quadtree datastructure.

    Review on Reviewable

    opened by speedplane 162
  • Two-Up View Redux

    Two-Up View Redux

    Building on what @Moistly started in #2395 (to fix #1475). Note that the following things might still be an issue:

    To-Do (before merging)

    • [x] Have "bookmark" option in toolbar capture the two-page settings
    • [x] Store in settings that the page was viewed in 2up mode (and restore the mode the next time the PDF is viewed)
    • [x] Remove shadow between two pages
    • [x] Three-page view happens occasionally
    • [x] Full-screen mode broken with two-up active
    • ~~When two-up is active and the zoom is set to 'page-fit', the vertical alignment of the pages becomes wrong. In this configuration, the uppermost pixels of the next pages become visible in the bottom of the screen. Note that I can only reproduce this if "Show Cover Page in Two Page View" is toggled on.~~
    • [x] In two-up view the margin to the left of the pages is always bigger than the right one, i.e. the pages gets placed of-centre horizontally in the viewerContainer. Edit: From looking at the HTML/CSS with the inspector in Firebug, it's clear that the margins are set totally wrong. Perhaps it would be good to instead define a special CSS class that gets invoked when switching to two-up. (This might also fix full screen mode.)
    • [x] There seems to be some issue regarding the rendering of pages when toggling "Show Cover Page in Two Page View". Until you actually scroll, or change page, the pages won't render. The above also sometimes happen when switching to/from two-up, but less frequently.
    • [x] It seems that the right hand page in two-up mode doesn't render as it should when scrolling. Observing how PDFView.getVisiblePages().views changes while scrolling down in a document probably explains a lot. Currently PDFView.getVisiblePages().views doesn't always correspond to what you actually see on the screen.
    • [x] When zooming in, the horizontal scrollbar don't get big enough, so some of the pages gets clipped of particular on the left side. This might be related to the margins, see above.
    • ~~When twoup is turned on, the cover page may randomly only draw half the page and never draw the rest unless the page is reloaded~~ I can no longer reproduce.
    • [x] The next-page button does not always act as expected.
    opened by waddlesplash 142
  • Add scrolling and spread modes to web viewer

    Add scrolling and spread modes to web viewer

    This PR adds two new features to the web viewer: scrolling modes and spread modes.

    With scrolling modes, horizontal scrolling and wrapped scrolling are added as alternatives to the default, vertical scrolling. (This layout is done entirely with CSS, although some JavaScript functions needed to be rewritten to work with the more flexible layout possibilities.)

    With spread modes, two-page spreads can be joined side-by-side, starting on either odd- or even-numbered pages.

    Here is a visual tour of the new features!

    The default view: vertical scrolling, no spreads

    Horizontal scrolling: horizontal scrolling, no spreads

    And wrapped scrolling: wrapped scrolling, no spreads

    Wrapped scrolling is adaptive to the size of the pages and the window: wrapped scrolling, no spreads, zoom 30%

    Wrapped scrolling is good for fitting more pages on your screen at once, but if what you really want is to be able to see printable materials in the two-up view presented by other PDF readers, you want to enable spreads: vertical scrolling, odd spreads

    Oops! In that view, the page numbers are on the insides of the spreads. That must mean that this document's spreads begin on even-numbered pages: vertical scrolling, even spreads

    That's better!

    Unlike wrapped scrolling, spreads make pages stick together at any zoom level: vertical scrolling, odd spreads, zoom 100% vertical scrolling, odd spreads, zoom 30%

    But you can still use spreads and wrapped scrolling together! Here's the document with odd spreads: wrapped scrolling, odd spreads

    And here it is with the correct spread mode for this document, even spreads: wrapped scrolling, even spreads

    Notice how you still fit the same number of pages on the screen, but choosing the right spread mode prevents spreads from being broken.

    Finally, because the layout is being handled by CSS and the browser's layout engine, unusually sized pages are fully supported by all of these options: wrapped scrolling, no spreads, start of document vertical scrolling, even spreads, start of document

    Now try it yourself!

    Closes #590, closes #2545, opens the door to your heart.

    P.S. Here is a list of suggestions compiled from comments and reviews for further improving these features (in later PRs, possibly by other people)

    • Set scroll and spread modes via document URL
    • Set default scroll and spread modes as preferences (Added to this PR)
    • In Wrapped Scrolling and/or Odd/Even Spreads modes, should previous/next page keys advance by page or by row/spread?
    • Should the Page Fit zoom preset fit an entire spread when Odd/Even Spreads is on? Or should we add a Fit Spread preset that does this?
    • Rewrite nearby classList.add/.remove calls to be consistent with added classList.toggle code (The .toggle calls were backed out in #9832.)
    • Add a focus ring for the current page
    • Squeeze margin between the two pages of a spread
    • Should Presentation Mode show more than one page when spreads and/or wrapping are in use?
    • In Even Spreads mode, should there always be a line break after the first page (not part of a spread), even if there's space on the line for both pages of the next spread?
    • The scroll position probably doesn't need to reset to top of current page absolutely every time the scroll/spread modes change (for example, when changing between vertical and wrapped scrolling when zoomed in so that only one page fits per row)
    viewer ux 
    opened by rhendric 122
  • [JS] Use beforeinput event to trigger a keystroke event in the sandbox

    [JS] Use beforeinput event to trigger a keystroke event in the sandbox

    • it aims to fix issue #14307;
    • this event has been added recently in Firefox and we can now use it;
    • fix few bugs in aform.js or in annotation_layer.js;
    • add some integration tests to test keystroke events (see AFSpecial_Keystroke);
    • make dispatchEvent in the quickjs sandbox async.
    opened by calixteman 114
  • Added multiple term search functionality (with default phrase search)

    Added multiple term search functionality (with default phrase search)

    This pull-request is very similar to #5496 Change allows:

    • in addition to the standard (phrase) search adds functionality to search multiple words separated by a space (multiple terms search)
    • define the word (or word list) to search in the url hash tag #search. When page has been loaded, document is scrolling to the search results.
    • specify the type of search (phrase or multiple term search) in the url hash tag #phrase (true or absent hash tag - default phrase search, false - multiple term search)
    • specify the type of search (phrase or multiple term search) in UI (checkbox 'Phrase', by default this is checked).


    Examples: find phrase 'Locking tames tamed tame':




    find multiple term search 'Locking tames tamed tame':


    Screenshots: pdfjspull-phrase


    This change is Reviewable

    opened by jazzy-em 113
  • Implement progressive loading of PDFs

    Implement progressive loading of PDFs

    This implements progressive loading of the PDF using an implementation similar to that described in #1108.

    Note: This is still a work in progress, so it's incomplete and a bit messy. It is NOT ready to be merged.

    Some of the things that still have to be done are:

    • [x] Integrate w/ extension
    • [x] For addon: fallback to fetching entire PDF if range requests are not supported
    • [x] For viewer: fallback to fetching entire PDF if range requests are not supported
    • [x] When there are no PDF chunks that are actively being requested, continue fetching PDF chunks sequentially
    • [x] Fetching the current page first when the user changes pages
    • [x] Optimization of parsing XRef tables/streams
    • [x] Optimization of fetching of page tree
    • [x] Possibly more optimizations specifically for linearized PDFs
    • [x] Code cleanup
    • [x] Unit tests, regression tests, etc...
    opened by mduan 110
  • Changes for new (Windows) bot - DOT NOT MERGE

    Changes for new (Windows) bot - DOT NOT MERGE


    I'm taking the bot for a spin here, this PR contains the necessary changes:

    • Upgrades ShellJS
    • Introduces makeref support in make.js


    opened by arturadib 80
  • Update the events, used with scripting, to use lower-case names and avoid using DOM events internally in the viewer + misc scripting-related tweaks

    Update the events, used with scripting, to use lower-case names and avoid using DOM events internally in the viewer + misc scripting-related tweaks

    Please refer to the individual commit messages for additional information.

    Also, ignoring white-space changes when viewing the larger patches should be helpful.

    core viewer 
    opened by Snuffleupagus 73
  • [api-minor] Fix the way to chunk the strings

    [api-minor] Fix the way to chunk the strings

    • Improve chunking in order to fix some bugs where the spaces aren't here;
    • add some breaks in order to get lines.
    • aims to fix: #7310, #7226, #12142 and probably few others.
    opened by calixteman 69
  • [api-minor] Include and use the 14 standard font files.

    [api-minor] Include and use the 14 standard font files.

    Fixes #4244 (at least for the standard font issue).

    I need to do some more testing to see if this impacts performance for the browser use case. I'm also considering disabling this feature for browsers so we use the builtin fonts. Though, we may want to use the various symbol fonts since those seem to vary per platform.

    opened by brendandahl 69
  • Inline the `setPDFNetworkStreamFactory` functionality in `src/display/api.js`

    Inline the `setPDFNetworkStreamFactory` functionality in `src/display/api.js`

    Given that this is internal functionality, not exposed in the official API, it's not entirely clear (at least to me) why we can't just initialize this directly in src/display/api.js instead. When testing both the development viewer and all the ways in which we run tests, everthing still appears to work just fine with this patch.

    core test 
    opened by Snuffleupagus 9
  • [api-minor] Improve the `useWorkerFetch` default value checks

    [api-minor] Improve the `useWorkerFetch` default value checks

    Given that the Fetch API only supports the http/https protocols, worker-thread fetching of CMaps and Standard-fonts may thus fail in certain cases. To improve the default behaviour we'll now also check that the cMapUrl and standardFontDataUrl options are appropriate, except in Firefox where this should always work.

    opened by Snuffleupagus 5
  • Update Puppeteer to the latest version

    Update Puppeteer to the latest version

    As can be seen from the first round of testing in PR #15864, trying to update Puppeteer beyond version 19.0.0 completely breaks testing in Firefox. Curiously it does work locally when the --noChrome flag is being used, so it seems to be an issue with running tests in both Chrome and Firefox in parallel.

    We need to fix this, likely by making some adjustments to our test-suite, such that we don't get "stuck" on an older version of Puppeteer without being able to update. (A temporary work-around could also be to disable testing in Chrome.)

    test firefox-specific 
    opened by Snuffleupagus 4
  • Unable to display electronic signature

    Unable to display electronic signature

    PDF file here: https://www.aliyundrive.com/s/oKbtms7DrzX


    • Google Chrome 108.0.5359.125
    • win11
    • PDF.js version: Newest,maybe v3.1.81

    What is the expected behavior? (add screenshot) image

    What went wrong? (add screenshot) image

    opened by bigdream6 4
  • Delay the loading icon display

    Delay the loading icon display

    In most of the cases, showing the loading icon is useless because it's for a very short time, consequently it doesn't bring any useful information for the user. After a delay (1s), the icon is shown in order to inform the user that the viewer isn't stuck but it's doing something.

    opened by calixteman 6
  • v3.2.146(Jan 1, 2023)

    This release primarily contains bugfixes and optimizations/cleanups, in particular to avoid re-rendering content unnecessarily on e.g. zooming and rotation, which should improve overall viewer performance.

    Changes since v3.1.81

    • Bump versions in pdfjs.config by @timvandermeij in https://github.com/mozilla/pdf.js/pull/15749
    • Add default icons for FileAttachment annotations (bug 1230933) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15747
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15750
    • Slightly modernize the FontLoader.isSyncFontLoadingSupported getter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15751
    • [JS] Fix a rounding issue in printf (bug 1802888) by @calixteman in https://github.com/mozilla/pdf.js/pull/15755
    • [JS] By default, a text field value must be treated as a number (bug 1802888) by @calixteman in https://github.com/mozilla/pdf.js/pull/15757
    • [api-minor] Remove all the useless telemetry stuff in the viewer (bug 1802468) by @calixteman in https://github.com/mozilla/pdf.js/pull/15758
    • Don't add an extra space after a Katakana or a Hiragana at the eol when searching by @calixteman in https://github.com/mozilla/pdf.js/pull/15760
    • Ignore PDF documents opened from "data:"-URLs when handling internal links (bug 1803050) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15762
    • [Editor] Change the text annotation cursor for the high dpi screens. by @calixteman in https://github.com/mozilla/pdf.js/pull/15718
    • Stop duplicating the platform getter in multiple files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15761
    • [Annotation] Send correctly the updated values to the JS sandbox by @calixteman in https://github.com/mozilla/pdf.js/pull/15764
    • [api-minor] Remove the TextLayer timeout parameter (PR 15742 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15765
    • Prevent the debugger from breaking on unbalanced save/restore OPS (issue 15767) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15768
    • [api-minor] Refactor the text layer code in order to avoid to recompute it on each draw by @calixteman in https://github.com/mozilla/pdf.js/pull/15722
    • Bump decode-uri-component from 0.2.0 to 0.2.2 by @dependabot in https://github.com/mozilla/pdf.js/pull/15771
    • Remove execution permission on cursor-editorFreeText.svg by @calixteman in https://github.com/mozilla/pdf.js/pull/15772
    • Enable the no-typeof-undefined ESLint plugin rule by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15752
    • [api-minor] Normalize the view-getter on the worker-thread by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15773
    • [api-minor] Combine the textContent/textContentStream parameters by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15779
    • Don't re-create the structTreeLayer on zooming and rotation by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15778
    • [Editor] Add a very basic and incomplete workaround for issue #15780 by @calixteman in https://github.com/mozilla/pdf.js/pull/15786
    • Tighten the vars-argument for the ESLint no-unused-vars rule by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15775
    • Remove the unused DefaultExternalServices.createDownloadManager options (PR 12191 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15776
    • [api-minor][Editor] Don't use the editor parent which can be null. by @calixteman in https://github.com/mozilla/pdf.js/pull/15782
    • [Editor] Take all the viewBox into account when computing the coordinates of an annotation in the page (fixes #15789) by @calixteman in https://github.com/mozilla/pdf.js/pull/15791
    • A few small viewer-related fixes by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15788
    • Fix page-switching for landscape documents with SpreadModes and PresentationMode (PR 14877 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15798
    • Ensure that the various layers always get the correct initial size (issue 15795) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15796
    • [AnnotationEditorLayerBuilder] Inline the destroy code in the cancel method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15800
    • Change the XfaLayerBuilder.render method to be asynchronous by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15805
    • Set the dimensions of the various layers at their creation by @calixteman in https://github.com/mozilla/pdf.js/pull/15770
    • Don't attempt to re-create the annotationLayer, for pages without any annotations, on zooming and rotation by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15806
    • [api-minor] Add a new PageViewport-getter to access the original, un-scaled, viewport dimensions by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15797
    • The annotation layer dimensions must be set before adding some elements (follow-up of #15770) by @calixteman in https://github.com/mozilla/pdf.js/pull/15820
    • [JS] Handle correctly choice widgets where the display and the export values are different (issue #15815) by @calixteman in https://github.com/mozilla/pdf.js/pull/15819
    • [JS] Run the named actions before running the format when the file is open (issue #15818) by @calixteman in https://github.com/mozilla/pdf.js/pull/15822
    • Initialize the TextHighlighter-instance lazily in PDFPageView by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15826
    • Handle possibly undefined parameters once per AnnotationLayer.render invocation by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15824
    • [api-minor] Allow specifying an extra-delay, in RenderTask.cancel, for worker-thread aborting of operatorList parsing by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15825
    • Don't remove the loading icon from the DOM when a page is resetted by @calixteman in https://github.com/mozilla/pdf.js/pull/15829
    • [GV] Add a viewer for GeckoView by @calixteman in https://github.com/mozilla/pdf.js/pull/15831
    • Always parse the entire startXRefQueue in XRef.readXRef (issue 15833) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15834
    • Protect a few additional DOM element accesses in the viewer (PR 15831 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15835
    • Attempt to expose OnProgressParameters in the TypeScript definitions (issue 15828) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15832
    • Strip out a reserved operator (9) from CFF char strings (fixes issue #15784) by @calixteman in https://github.com/mozilla/pdf.js/pull/15841
    • [GeckoView] Ignore the pageLayout, from the PDF document, to prevent issues by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15842
    • [TextLayer] Hide the text layer when it's created in order to avoid reflows (fix #15844) by @calixteman in https://github.com/mozilla/pdf.js/pull/15845
    • Display the text layer before running the a11y stuff (follow-up of #15845) by @calixteman in https://github.com/mozilla/pdf.js/pull/15847
    • Avoid to compute the client rect of the viewer by @calixteman in https://github.com/mozilla/pdf.js/pull/15830
    • [Editor] Avoid to scroll when an annotation is commited (fixes issue #15744) by @calixteman in https://github.com/mozilla/pdf.js/pull/15849
    • [api-minor] Remove the default factories, used to initialize various layers, in the viewer by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15811
    • A couple of small viewer fixes (PR 15811 and 15831 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15852
    • Ensure that the loadingIconDiv is always visible (PR 15829 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15860
    • Re-factor searching for incomplete objects in XRef.indexObjects (issue 15803) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15854
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15864
    • Only redraw after zooming is finished (bug 1661253) by @calixteman in https://github.com/mozilla/pdf.js/pull/15812
    • Set a z-index for the different layers within a page (fixes #15861) by @calixteman in https://github.com/mozilla/pdf.js/pull/15862
    • [Regression] Ensure that documents with varying page sizes are initialized correctly (PR 15812 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15872
    • Remove PDFPageProxy.getJSActions caching, since it's unused, in the API by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15870
    • Always abort a pending streamReader cancel timeout in PDFPageProxy._abortOperatorList (PR 15825 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15869
    • Only display the loadingIcons when rendering is currently running by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15867
    • Improve name consistency in the viewer (PR 15812 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15875
    • Decouple the loadingBar background-color from the rest of the viewer by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15874
    Source code(tar.gz)
    Source code(zip)
    pdfjs-3.2.146-dist.zip(5.47 MB)
    pdfjs-3.2.146-legacy-dist.zip(5.68 MB)
  • v3.1.81(Nov 26, 2022)

    This release primarily contains bugfixes and optimizations/cleanups, in particular a follow-up on the previous release where a dependency we use could cause installation issues on certain platforms.

    Changes since v3.0.279

    • Bump versions in pdfjs.config by @timvandermeij in https://github.com/mozilla/pdf.js/pull/15643
    • Changed link for "Gulp's getting started guide" by @SpartanApple in https://github.com/mozilla/pdf.js/pull/15649
    • [Form] Don't use field appearances when /NeedAppearances is set to true (bug 1796741) by @calixteman in https://github.com/mozilla/pdf.js/pull/15615
    • Prevent interaction with form elements in PresentationMode (issue 12232) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15648
    • Move canvas to optionalDependencies by @tamuratak in https://github.com/mozilla/pdf.js/pull/15655
    • [api-minor] Let Catalog.getAllPageDicts return an empty dictionary when loading the first /Page fails (issue 15590) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15613
    • Use private fields in a few more viewer classes by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15663
    • Cache the normalized unicode-value on the Glyph-instance by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15657
    • [api-minor] Initialize the unicode-category lazily on the Glyph-instance by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15665
    • [api-minor] Propagate the translated font name to TextContentItem for system fonts by @sxyuan in https://github.com/mozilla/pdf.js/pull/15659
    • [Annotation] Fix printing/saving for annotations containing some non-ascii chars and with no fonts to handle them (bug 1666824) by @calixteman in https://github.com/mozilla/pdf.js/pull/15587
    • Use the full inline image as the cacheKey in Parser.makeInlineImage (bug 1799927) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15679
    • Some small AnnotationStorage and StatTimer clean-up by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15682
    • Change the assert in Parser.findDefaultInlineStreamEnd to a non-PRODUCTION one by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15686
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15689
    • Take the mask-offset into account when rendering repeated image masks (bug 1799927) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15688
    • Stop Dependabot from creating its own, otherwise unused, labels by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15693
    • Bump minimatch from 3.0.4 to 3.1.2 by @dependabot in https://github.com/mozilla/pdf.js/pull/15692
    • Normalize fullwidth, halfwidth and circled chars when searching by @calixteman in https://github.com/mozilla/pdf.js/pull/15694
    • Initialize the find-related DIACRITICS_EXCEPTION_STR constant lazily by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15698
    • Move the _isOffscreenCanvasSupported property to the base Annotation class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15699
    • Remove unnecessary function names in the src/core/worker.js file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15706
    • Move some string helper functions to the worker-thread by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15701
    • Add localization support for the annotationLayer reference tests (issue 10791) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15710
    • Reduce duplication when creating a fallback appearance for MarkupAnnotations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15713
    • Remove the overflowing text special-case from scrollIntoView (issue 15714) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15721
    • Unblock the load event when the pdf has a password (bug 1801341) by @calixteman in https://github.com/mozilla/pdf.js/pull/15727
    • Support FileAttachments with hash-signs in the filename (issue 15729) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15730
    • Add support for Optional Content in TilingPatterns (issue 15716) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15731
    • Revert "Remove the overflowing text special-case from scrollIntoView (issue 15714)" by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15740
    • Add a fallback for non-embedded composite Tahoma fonts (issue 15719) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15732
    • [api-minor] Deprecate the TextLayer timeout parameter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15742
    • Re-factor and simplify the getQuadPoints helper function by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15715
    • Ensure that the initial document position is always correct with non-default Scroll/Spread modes (issue 15695) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15720
    Source code(tar.gz)
    Source code(zip)
    pdfjs-3.1.81-dist.zip(5.46 MB)
    pdfjs-3.1.81-legacy-dist.zip(5.66 MB)
  • v3.0.279(Oct 29, 2022)

    This major release features the new editor mode in the viewer (enabled by default now), new icons in the viewer, removal of deprecated functionality/APIs, removal of support for outdated browser versions, font conversion/text selection improvements and other features/bugfixes.

    Changes since v2.16.105

    • Bump versions in pdfjs.config by @timvandermeij in https://github.com/mozilla/pdf.js/pull/15357
    • [api-major] Remove the enhanceTextSelection functionality (PR 15145 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15259
    • [api-major] Remove (most of) the remaining deprecated code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15286
    • [api-minor] Support Named-actions in the outline (issue 15367) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15368
    • [Editor] Avoid to update default params too early by @calixteman in https://github.com/mozilla/pdf.js/pull/15369
    • [Editor] Use the global clipboard for the copy/paste/cut operations by @calixteman in https://github.com/mozilla/pdf.js/pull/15373
    • [Editor] Remove some useless code (#15373 follow-up) by @calixteman in https://github.com/mozilla/pdf.js/pull/15381
    • [Editor] Update some strings (bug 1787299) by @calixteman in https://github.com/mozilla/pdf.js/pull/15378
    • Update editing icons (bug 1785248) by @calixteman in https://github.com/mozilla/pdf.js/pull/15385
    • [Editor] Change the cursor when we switch to FreeText mode (bug 1787297) by @calixteman in https://github.com/mozilla/pdf.js/pull/15386
    • Remove the browserify example by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15388
    • Properly ignore PopupAnnotations with custom trigger-elements by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15360
    • Remove Bower support in pdfjs-dist by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15390
    • [api-minor] Add basic support for the SetOCGState action (issue 15372) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15377
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15394
    • Don't replace cr by a white space when the last char on the line is an ideographic char by @calixteman in https://github.com/mozilla/pdf.js/pull/15395
    • Don't allow adjustToUnicode to extend a built-in /ToUnicode map (issue 15352) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15392
    • Fallback to a standard font when a Type1 font program is empty (issue 15292) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15397
    • Remove the "tagged" telemetry-reporting by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15402
    • Use more optional chaining in the code-base by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15398
    • Update some icons in the toolbar (bug 1739965) by @calixteman in https://github.com/mozilla/pdf.js/pull/15384
    • Set a display value for the secondary toolbar buttons by @calixteman in https://github.com/mozilla/pdf.js/pull/15413
    • Move 'presentation mode' and 'bookmarks' buttons in the secondary toolbar (bug 1789082) by @calixteman in https://github.com/mozilla/pdf.js/pull/15391
    • Don't listen for window resolution changes in old browsers (PR 15319 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15418
    • Fix the visibility of a separator in the secondaryToolbar (PR 15391 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15421
    • Send the verbosity when using a workerPort (issue 15419) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15420
    • Remove the abstract BaseViewer-class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15414
    • Add some telemetry to know how often the buttons in the secondary toolbar are used (bug 1789883) by @calixteman in https://github.com/mozilla/pdf.js/pull/15416
    • Don't try to update the cursorTool when switching to PresentationMode failed by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15425
    • Disable the editing-indicator, in the document title, during printing (bug 1790552, PR 15351 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15431
    • [api-major] Enable editing by default by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15339
    • [api-minor] Use new Worker() syntax in webpack entrypoint by @srmagura in https://github.com/mozilla/pdf.js/pull/15430
    • Extend getGlyphMapForStandardFonts with some quote-entries (issue 15441) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15442
    • Extend getSupplementalGlyphMapForCalibri with more entries (issue 15443) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15445
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15454
    • Remove the enableScripting-parameter from the component examples (PR 13816 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15446
    • [api-major] Update the minimum supported browsers/environments by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15451
    • Temporarily stop listing the official Chrome extension in the main README by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15452
    • Some small viewer clean-up for non-GENERIC builds by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15432
    • Don't update the Scroll/Spread-mode in the ViewHistory while PresentationMode is active (issue 15453) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15455
    • Improve CSS for HCM (bug 1726183) by @calixteman in https://github.com/mozilla/pdf.js/pull/15438
    • Replace some unnecessary String.prototype.search usage by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15458
    • Don't use window.print in the Firefox builtin viewer (bug 1774427) by @calixteman in https://github.com/mozilla/pdf.js/pull/15459
    • Enable the unicorn/prefer-regexp-test ESLint plugin rule by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15460
    • [XFA] - Avoid an exception when zooming on a XFA by @calixteman in https://github.com/mozilla/pdf.js/pull/15462
    • Use AccentColor as background for selected text in the text layer (bug 1790309) by @calixteman in https://github.com/mozilla/pdf.js/pull/15461
    • Fix commFunc typo in the SandboxSupportBase.destroy method by @nmtigor in https://github.com/mozilla/pdf.js/pull/15473
    • Fix #selectEditors typo in the AnnotationEditorUIManager.unselectAll method by @nmtigor in https://github.com/mozilla/pdf.js/pull/15474
    • [Editor] Make sure to have the annotation editor layer on top of the annotation one (bug 1791515) by @calixteman in https://github.com/mozilla/pdf.js/pull/15468
    • [XFA] Fix an hidden issue in the FormCalc lexer by @calixteman in https://github.com/mozilla/pdf.js/pull/15476
    • Access the setTimeout-functionRefs correctly in SandboxSupportBase.destroy by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15477
    • Initialize values in the path bounding box before flushing the operator list (bug 1791583) by @calixteman in https://github.com/mozilla/pdf.js/pull/15478
    • [JS] Remove duplicate this._document assignment in the App-class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15483
    • Restore the old fonts in the debugger (PR 15438 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15489
    • Set a border-radius when hovering annotationLayer-inputs (PR 15438 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15491
    • [JS] Try to guess what the date is when it doesn't follow the given format (issue #15490) by @calixteman in https://github.com/mozilla/pdf.js/pull/15493
    • Tweak the heuristic that handles JPEG images with a wildly incorrect SOF (Start of Frame) scanLines parameter (issue 15492) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15494
    • Revert "Don't use window.print in the Firefox builtin viewer (bug 1774427)" by @calixteman in https://github.com/mozilla/pdf.js/pull/15495
    • Replace some Array.prototype-usage with spread syntax by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15498
    • Use more optional chaining in the code-base (PR 15398 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15485
    • Reference supported browsers Wiki-page in more README files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15499
    • [api-minor] Stop exposing the LoopbackPort class in the API by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15500
    • Restore the old fonts in the errorWrapper (PR 15438 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15501
    • Use a consistent outline for all UI buttons (PR 15438 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15503
    • Use stopImmediatePropagation without checking for its existence first by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15504
    • Improve the FontLoader code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15507
    • Fix property chain orders of Operators in isDotExpression by @nmtigor in https://github.com/mozilla/pdf.js/pull/15486
    • [JS] Override the Doc.external-getter to avoid alert-modals on load (issue 15509) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15512
    • [Editing] Disable the HandTool during editing (bug 1792422) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15522
    • [JS] Add the function AFExactMatch by @calixteman in https://github.com/mozilla/pdf.js/pull/15527
    • Revert "Don't listen for window resolution changes in old browsers (PR 15319 follow-up)" by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15515
    • Add more non-standard ligatures in the glyphlist.js file (issue 15516) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15517
    • Replace the DOMMatrix polyfill, used with Node.js, with the one from node-canvas by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15514
    • More FontLoader clean-up by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15511
    • Re-factor the toggleButton l10n in the PDFSidebar class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15530
    • Change how src/shared/compatibility.js is imported by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15510
    • Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/15508
    • [GENERIC viewer] Remove the errorWrapper UI by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15533
    • [api-minor] Stop setting an id on the styleElement used with CSS font-loading by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15534
    • Use more for...of loops in the code-base by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15536
    • [api-minor] Add partial support for the "GoToE" action (issue 8844) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15537
    • [api-minor] Make isOffscreenCanvasSupported configurable via the API (issue 14952) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15542
    • Replace loop with TypedArray.prototype.set in the DecryptStream.readBlock method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15539
    • Stop localizing error details in the viewer (PR 15533 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15538
    • Remove the unused Util.apply3dTransform method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15547
    • Simplify the way to compute the remainder modulo 3 in PDF20Hash function by @calixteman in https://github.com/mozilla/pdf.js/pull/15548
    • [XFA] Add some padding inline in selects by @calixteman in https://github.com/mozilla/pdf.js/pull/15549
    • [api-major] Remove some deprecated constants by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15554
    • Remove the unused CMapCompressionType.STREAM value by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15553
    • Simplify the dropdownToolbarButton-select width computation by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15552
    • Clean-up the data that we're sending with "GetDocRequest" by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15555
    • Ensure that Page.getOperatorList handles Annotation parsing errors correctly (issue 15557, bug 1794351) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15558
    • Slightly re-factor the version fetching in PDFDocument.checkHeader by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15562
    • [GENERIC viewer] Ensure that the we register the editorTypes for each AnnotationEditorUIManager-instance (issue 15564) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15565
    • [Editor] Change the caret cursor into the arrow one only when a text editor isn't empty (bug 1794717) by @calixteman in https://github.com/mozilla/pdf.js/pull/15567
    • [JS] Take into account all the required fields for some computations by @calixteman in https://github.com/mozilla/pdf.js/pull/15570
    • [api-minor] Stop sending "UnsupportedFeature" from the worker-thread GetOperatorList-handling by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15569
    • Take the /CIDToGIDMap into account when getting the glyph mapping for CFF fonts (issue 15559) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15563
    • Use all the current transform as key when caching some image for masks used with pattern fill (bug 1795263, #15573) by @calixteman in https://github.com/mozilla/pdf.js/pull/15574
    • Don't trigger worker-thread cleanup when destruction has already started by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15575
    • Slightly re-factor PartialEvaluator._simpleFontToUnicode by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15572
    • Re-factor the PDF version parsing in the worker-thread by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15576
    • [Editor] Ink editors must have their dimensions in percents after having been resized by @calixteman in https://github.com/mozilla/pdf.js/pull/15578
    • Tweak the vertical position of the sidebar notification icon by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15579
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15580
    • [Editor] Commit the current editor before setting the new viewport by @calixteman in https://github.com/mozilla/pdf.js/pull/15583
    • Fallback and try a previous generation if all else fails in XRef.indexObjects (issue 15577) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15589
    • [Annotation] Take the border into account when computing the font size (bug 1794403) by @calixteman in https://github.com/mozilla/pdf.js/pull/15592
    • Relax the /Pages dictionary /Count check for corrupt documents (issue 9105) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15593
    • Extend getSupplementalGlyphMapForCalibri with some umlauts (issue 15594) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15596
    • [Editor] Make FreeText annotations visible for screen readers when in editing mode (bug 1793419) by @calixteman in https://github.com/mozilla/pdf.js/pull/15595
    • [Annotation] Replace use of id by data-element-id to have the correct id (bug 1796544) by @calixteman in https://github.com/mozilla/pdf.js/pull/15598
    • Remove the Glyph.matchesForCache method (PR 13494 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15586
    • Restore a weaker version of the /Pages dictionary /Count check for corrupt documents (PR 15593 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15603
    • Update icons (last and final update) by @calixteman in https://github.com/mozilla/pdf.js/pull/15608
    • Let Lexer.getNumber treat more invalid "numbers" as zero (issue 15604) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15606
    • Revert "Avoid all rendering breaking completely when CanvasPattern.setTransform() is unsupported" (PR 13725 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15581
    • Update the l10n-strings for the download-buttons (bug 1662416) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15617
    • Let the PdfManager.requestLoadedStream method return the stream by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15616
    • Fix font for the 'current view' entry in the secondary toolbar (bug 1797310) by @calixteman in https://github.com/mozilla/pdf.js/pull/15625
    • Fix editor tests on Windows by @calixteman in https://github.com/mozilla/pdf.js/pull/15623
    • Prevent textLayer errors in documents with unbalanced beginMarkedContent/endMarkedContent operators (issue 15629) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15630
    • [JS] Avoid to trigger a commit event on 'ENTER' when the textfield is multiline by @calixteman in https://github.com/mozilla/pdf.js/pull/15631
    • Combine Array.from and Array.prototype.map calls by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15637
    • [JS] Some functions (print, alert,...) must be called only after a user activation by @calixteman in https://github.com/mozilla/pdf.js/pull/15618
    • [api-minor] Move the handling of unbalanced markedContent to the worker-thread (PR 15630 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15632
    • [Editor] Change the cursor icons by @calixteman in https://github.com/mozilla/pdf.js/pull/15633
    • Remove the PdfManager.onLoadedStream method (PR 15616 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15641
    • Update packages and translations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/15640
    • Bump minimist by @dependabot in https://github.com/mozilla/pdf.js/pull/15642
    Source code(tar.gz)
    Source code(zip)
    pdfjs-3.0.279-dist.zip(5.45 MB)
    pdfjs-3.0.279-legacy-dist.zip(5.65 MB)
  • v2.16.105(Aug 28, 2022)

    This release features bugfixes and accessibility improvements for the new experimental editor mode in the viewer as introduced in the previous release.

    Changes since v2.15.349:

    #15252 Bump versions in pdfjs.config #15251 Ignore too small page-canvases in PDFThumbnailView.setImage #15253 [api-minor] Update the minimum supported Safari version #15263 Always set a border-radius for RadioButton annotations (issue 15262) #15264 [Editor] Add some telemetry to know how often the editing features are used (bug 1782254) #15268 Fix a typo in firefox print service (bug 1777693) #15271 Skip unknown fields when calculating a value in using AFSimple_Calculate #15267 [Annotation] Add a div containing the text of a FreeText annotation (bug 1780375) #15274 [Editor] A pasted FreeText editor was missing when printing/saving #15275 [Editor] Remove some a11y properties only useful when a FreeText editor is edited #15282 Enable the ESLint prefer-spread rule #15261 Don't include images/toolbarButton-editorInk.svg in the gulp components build (issue 15260) #15281 Remove mozCurrentTransform/mozCurrentTransformInverse usage #15283 [api-minor] Sort PopupAnnotations already on the worker-thread (PR 11535 follow-up) #15284 Update packages and translations #15287 [Editor] Remove use of innerHtml #15290 Fix OTS issue with empty index (#15289) #15295 [Editing] Disable buttons until the first page is rendered #15296 Move the reset-calls to occur last in the toolbar-constructors #15297 [Editor] Avoid creation of an editor on "wrong" clicks #15298 [Editor] Ensure an ink editor has the minimal required size after having been pasted #15279 Remove the extensions/firefox/README.mozilla file (bug 1778567 follow-up) #15299 Add official support for passing ArrayBuffer-data to getDocument (issue 15269) #15237 [Annotations] Add some aria-owns in the text layer to link to annotations (bug 1780375) #15307 [Annotation] Add an aria role comment for FreeText annotations #15309 Remove the remaining closure in the src/core/function.js file #15306 Only compile Type3 glyphs when Path2D is supported #15300 [GENERIC viewer] Export some viewer constants in the default viewer (issue 15294) #15311 Don't add aria-owns attributes for non-existent elements (PR 15237 follow-up) #15310 Remove the remaining closures in the src/core/cff_parser.js file #15313 Move binarySearchFirstItem back to the web/-folder (PR 15237 follow-up) #15319 Refresh the viewer if the window resolution changes (bug 1784850) #15318 A couple of small PDFWorker changes #15315 Remove the remaining closures in the src/core/type1_parser.js file #15325 Ignoring "resize" events during printing (issue 15324) #15327 Correctly mimic the proper event-format in AnnotationElement._setDefaultPropertiesFromJS (bug 1785218) #15329 [api-minor][Annotations] charLimit === 0 means unlimited (bug 1782564) #15338 Update packages and translations #15332 [api-minor] Add the Babel targets-option to avoid transpiling code for unsupported browsers #15335 Ensure that we don't try to re-open, or update the password-callback, when the password dialog is already open #15348 [editor] Change the focus-outline to blue (bug 1787296) #15347 Update types in PDFPageViewOptions to properly declare optional parameters #15355 Always focus the viewerContainer when entering PresentationMode (bug 1787456) #15344 Enable the unicorn/prefer-array-find ESLint plugin rule #15343 Use AbortController unconditionally with the Fetch API #15341 Improve handling of the "Cancel"-button in the password dialog #15346 [api-minor] Deprecate the imageLayer functionality #15351 [api-minor][editor] Indicate, in the title, if the document has been edited (bug 1785854) #15349 [editor] Remove the editorNone toolbar button (bug 1787295) #15356 Update the Node.js atob/btoa compatibility info

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.16.105-dist.zip(5.50 MB)
    pdfjs-2.16.105-legacy-dist.zip(5.70 MB)
  • v2.15.349(Jul 31, 2022)

    This release features rendering quality improvements and a new experimental editor mode in the viewer, providing users with basic PDF editing functionality such as inserting annotations.

    Changes since v2.14.305:

    #14919 Bump versions in pdfjs.config #14920 Update packages and translations #14921 Adjust the heuristics for handling of incomplete path operators (issue 14917) #14898 [api-minor] Use a CSS transform to update the progress bar instead of changing the width (bug 1768481) #14945 Allow to have float numbers when getting image information in reftest-analyzer #14947 Twitter should be capitalized. #14929 Display background when printing or saving a text widget (issue #14928) #14926 Remove the sourceEventType from the viewer (bug 1757771 follow-up) #14948 Set 'dropEffect' based on 'effectAllowed' for drag-and-drop in the viewer (issue 14942) #14950 [JS] Format all the fields if any when the document is open (bug 1766987) #14955 Skip bogus d1 operators in Type3-glyphs (issue 14953) #14957 Introduce a viewer constant for document.documentElement.style #14959 Support custom pageColors in the thumbnails (PR 14874) #14965 Support Hangul syllables when searching some text (bug 1771477) #14936 Set the text fields font size based on their height #14966 Use globalThis for webpack's output.globalObject instead of this #14963 Handle CSS-comments correctly in the preprocess-function (PR 14886 follow-up) #14964 Ensure that the contentDispositionFilename is always respected, when setting the document title (PR 13014 follow-up) #14962 Improve the PDFSidebar implementation #14967 Update packages and translations #14968 A small memory-usage improvement for PDF documents opened from TypedArray-data #14980 Handle CSS-comments better in the preprocess-function (PR 14963 follow-up) #14976 [editor] Add a FreeText editor (#14970) #14988 Remove mention of gulp singlefile-command from examples/node/getinfo.js #14985 [editor] A couple of small FreeText-related fixes (PR 14976 follow-up) #14984 Bundle the <dialog> polyfill-CSS in the GENERIC legacy/-viewer (PR 14710 follow-up) #14991 [editor] Disable the editor-buttons in XFA documents #14992 Lookup image-data correctly in paintImageMaskXObjectGroup (issue 14990) #14993 [editor] Update the AnnotationStorage.hash-getter to support editing #14994 Conditionally bundle gulp image_decoders-specific code in src/core/jbig2.js (PR 9729 follow-up) #14998 Reset all the canvas states after rendering each annotations (#14105) #15000 Outline fields which are required (bug 1724918) #15001 Set "presentation" role for page canvases (issue 14437) #15003 Change the name of the generated pdf.sandbox.external for mozilla-central #14978 [editor] Add support for saving a newly added FreeText #15008 Polyfill Array.prototype.at with core-js (PR 14976 follow-up) #15011 Fix a couple of old review comments #15013 Render PopupAnnotations even if they have missing or empty /Rect-entries (issue 15012, PR 14439 follow-up) #14989 [editor] Add an Ink editor #15006 [editor] Add support for saving newly added Ink #15019 Revert "Change the name of the generated pdf.sandbox.external for mozilla-central" #15015 Extend TextLayerRenderParameters.container type to include HTMLElement. #15020 Add an empty entry in combo list when nothing is selected (bug 1773680) #15014 Enable the unicorn/prefer-at ESLint plugin rule (PR 15008 follow-up) #15018 Expose TextLayerRenderTask in the TypeScript definitions (issue 15016, PR 14013 follow-up) #15022 Tweak the editorNone icon to circumvent the "duplicated files"-check #15026 [api-minor] Stop using the beginAnnotations/endAnnotations operators (PR 14998 follow-up) #15027 Remove superfluous trailing arguments from parseFloat-calls (PR 14978 follow-up) #15029 Enable the unicorn/prefer-dom-node-append ESLint plugin rule #15023 Enable the unicorn/prefer-array-flat and unicorn/prefer-array-flat-map ESLint plugin rules #15028 [api-minor] Update the minimum supported browsers/environments #15030 Update packages and translations #15031 Enable the unicorn/prefer-modern-dom-apis ESLint plugin rule #15034 Extend getGlyphMapForStandardFonts with some Hebrew entries (issue 15033) #15046 Add basic support for non-embedded ArialUnicodeMS fonts (issue 15044) #15050 [Editor] - Add the ability to directly draw after selecting ink tool #15051 Fix "Good Beginner Bugs" link #15054 [JS] Hide field borders and buttons (#15053) #15035 Use modern DOM methods a bit more (PR 15031 follow-up) #15048 Only define the renderer-option in the GENERIC viewer #15052 Simplify setting the defaultUrl-option in the CHROME viewer (PR 12470 follow-up) #15057 Replace element ids with custom attributes for Widget-annotations (issue 15056) #15036 [api-minor] Get rid of CSS transform on each annotation in the annotation layer #15058 [api-minor] Remove the "baseviewerinit" event since it's unused (PR 14324 follow-up) #15059 Reduce unnecessary usage of Array.prototype.concat() #15065 Popup trigger area must filled its parent (fix #15063) #15064 Avoid having overflowing sections (#15036 follow-up) #15062 Simplify the newRefs computation in the "SaveDocument"-handler in the worker-thread #15071 Add an outline around popup trigger areas in ref-tests #15074 Only activate ink editor if none is selected #15069 Ensure that the annotationLayer has the correct dimensions (PR 15036 follow-up) #15075 [editor] Support disabling of editing when pdfjs.enablePermissions is set (issue 15049) #15060 Rotate annotations based on the MK::R value (bug 1675139) #15047 [Editor] Add support for printing newly added Ink annotations #15076 Enable the prefer-array-index-of ESLint plugin rule #15081 Fix (obvious) typo in typedef-import of IPDFXfaLayerFactory (PR 14373 follow-up) #15082 [Editor] Add support for printing newly added FreeText annotations #15089 Correctly order added annotations when saving or printing #15043 [api-minor] Introduce a PrintAnnotationStorage with frozen serializable data #15093 [JS] Update siblings when a field is updated after a calculation (#15092) #15097 Fix unit test (#15093 follow-up) #15095 Add (basic) support for Optional Content in Annotations #15101 Use the built components/pdf_viewer.css file in the reference tests #15099 Remove element ids from the layersView in the sidebar #15100 chore: Included githubactions in the dependabot config #15103 chore: Set permissions for GitHub actions #15088 Support rotating editor layer #15104 Update translations and dependencies to the most recent versions #15105 Always flush the current item with MarkedContent stuff when getting text (#15094) #15039 [editor] Add some UI elements in order to set font size & color, and ink thickness & color #15113 [editor] Introduce a proper annotationEditorMode option/preference (PR 15075 follow-up) #15111 Add a visible page border in HCM (bug 1776914) #15116 Fix the annotationEditorMode-compatibility for older browsers (PR 15113 follow-up) #15117 [Editor] Set the freetext editor dimensions when the changing the font size #15118 [Editor] Allow to select a freetext editor when in ink mode #15115 [Editor] Handle correctly colors when saving a document in HCM #15122 [editor] Tweak @media CSS rules to account for the new toolbar buttons #15123 [editor] Disable editing while PresentationMode is active #15121 [api-minor] Further modernize the ProgressBar class (PR 14918 follow-up) #15126 [Editor] Update the id for a l10n string #15125 Fix the Popup-trigger for FileAttachmentAnnotationElement (PR 15036 follow-up) #15124 Call AnnotationLayer.setDimensions as part of the render/update-methods (PR 15036 follow-up) #15133 Improve text-selection for Type3 fonts with bogus /FontBBox-entries (issue 14999) #15130 [Editor] Dispatch an event when some global states are changing (bug 1777695) #15142 [editor] Use the fit-curve package (issue 15004) #15144 [Editor] Allow editors deletion on Backspace or Delete keys #15146 [Editor] Change the cursor to a pen for the Ink editor #15143 [jsdoc] failing typescript builds - wrong type #15147 [Editor] Avoid to resize and redraw the ink canvas when it's useless #15135 Use default colors only in forced-colors mode (bug 1778068) #15151 [Editor] Remove useless and faulty code when destroying the global manager #15152 Ensure that the /Resources-entry is actually a dictionary (issue 15150) #15153 [Annotation] A push button can have no action (bug 1778692) #15145 [api-minor] Deprecate the enhanceTextSelection functionality #15155 Update packages and translations #15154 Replace element ids with custom attributes in the xfaLayer #15158 Update ttx from version 2.5 to version 3.19.0 #15159 [Editor] Avoid to have the ink editor smaller than the resizer (bug 1778982) #15163 [Editor] Always have an ink editor (when in ink mode) #15162 Enable the unicorn/prefer-logical-operator-over-ternary ESLint plugin rule #15157 Add unicode mapping in the font cmap to have correct chars when printing in pdf (bug 1778484) #15168 Disable canvas acceleration for linux tests #15169 Handle errors in the "Loading by ref" code-path in PartialEvaluator.loadFont #15170 [JS] Embedded JS scripts can have some null chars #15173 [api-minor] Deprecate the SVG back-end #15184 [Editor] Simplify the way to create an editor on click #15179 [Editor] Use serialized data when copying/pasting #15174 Use more for...of loops in the code-base #15110 [Editor] Improve a11y for newly added element (#15109) #15187 [Editor] Remove useless and potentially deleted editors #15185 [Editor] Ink editor was too much translated after commit #15186 [Editor] Move the keyboard manager at the container level #15192 Ignore invalid /CIDToGIDMap-entries when parsing fonts (issue 15139) #15195 [Editor] No need to click twice to create an editor when the last one is empty #15199 Bump terser from 5.14.1 to 5.14.2 #15196 [Editor] Add a z-index in order to draw them in the right order #15183 Remove the svgviewer example #15206 [Editor] Simplify the command manager #15200 [Editor] Add the ability to make multiple selections (bug 1779582) #15210 [Editor] Unselect correctly removed editors #15188 [Editor] Replace mouse events by pointer ones (bug 1779015) #15211 [Editor] Fix multi-selection on touch screens #15214 Update packages and translations #15218 [Editor] Fix few keyboard shortcuts on mac #15221 Support images with /Filter-entries that contain Arrays (issue 15220) #15230 [Editor] Avoid editor creation/selection on right click (bug 1781762) #15231 [Editor] Don't set as active an editor which is not (bug 1781763) #15219 [Editor] Add the possibility to change line opacity in Ink editor #15233 [Editor] Avoid to add unexpected commands in the undo/redo queue when undoing/redoing (bug 1781790) #15234 [Editor] Reset the queue when a command is added after having undone all the commands #15217 [Editor] Simplify the strings for the tools in the UI #15236 Set opacity in the reference tests (PR 15219 follow-up) #15235 Ensure that the isUsingOwnCanvas-parameter is consistently included in operatorLists (PR 14247 follow-up) #15232 Fix text selection with hdpi screens (#15229) #15238 Fix wrong order of arguments when calling the CipherTransform ctor (bug 1782186) #15240 [api-minor] Change the various factories, in the viewer, to accept Objects #15242 [Editor] Avoid to slightly move ink editor when undoing/redoing #15244 [Editor] Add an editor in the annotation storage only when it's non-empty (#15241) #15215 [api-minor] Improve how we disable PDFThumbnailView.setImage for documents with Optional Content #15248 Update l10n files #15247 Misc. small CSS cleanup #15246 [api-minor] Improve thumbnail handling in documents that contain interactive forms

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.15.349-dist.zip(5.50 MB)
    pdfjs-2.15.349-legacy-dist.zip(6.04 MB)
  • v2.14.305(May 14, 2022)

    This release features improvements for the text layer (space insertion), canvas rendering (thin line rendering), forms (printing/saving of choice lists) and accessibility (sidebar and search results). Moreover, this release contains performance improvements for rendering image masks, Type3 fonts and certain drawing instructions. Finally, the user can now specify custom background/foreground colors for rendering in the viewer.

    Changes since v2.13.216:

    #14614 Bump versions in pdfjs.config #14536 Fix some issues with lineWidth < 1 after transform (bug 1753075, bug 1743245, bug 1710019) #14615 Remove the -webkit-overflow-scrolling: touch; CSS rules (PR 4516 follow-up) #14617 Remove the -webkit-outer-spin-button CSS rule #14623 Remove some deprecated code from the viewer #14624 Simplify the fallback-logic in the default viewer #14629 Compute the loca table endOffset, of the "first" glyph, correctly (issue 14618) #14631 Fix a couple of small typos in JSDoc typedef comments #14628 When stopAtErrors is set, throw rather than warn when exceeding maxImageSize (issue 14626) #14634 Replace XMLHttpRequest usage with the Fetch API in Driver.run #14633 Update packages and translations #14635 Replace XMLHttpRequest usage with the Fetch API in loadStyles (in test/driver.js) #14638 Replace XMLHttpRequest usage with the Fetch API in the reftest-analyzer #14637 Use proper private methods in web/{pdf_cursor_tools,pdf_find_bar,secondary_toolbar}.js #14636 Replace XMLHttpRequest usage with the Fetch API in Driver._quit #14640 Update TypeScript to version 4.6.2 and work-around stricter type checks #14648 Simplify the PDFDocument constructor #14645 [api-minor] Remove the, in legacy builds, bundled DOMMatrix polyfill #14642 Replace XMLHttpRequest usage with the Fetch API in Driver._send #14651 Replace XMLHttpRequest usage with the Fetch API in inlineImages (in test/driver.js) #14620 Bug 1757527 - Slightly reduce (repeated) message passing overhead when localizing the PDF Viewer #14554 Try to improve a11y for the "button groups" in the SecondaryToolbar/Sidebar (issue 14526) #14654 Replace XMLHttpRequest usage with the Fetch API in send (in test/unit/testreporter.js) #14656 Move the isSameOrigin helper function #14658 Validate the cMapUrl/standardFontDataUrl parameters in getDocument #14661 Update Checkout to version 3 #14667 Enable the "gets fieldObjects" unit-test in Node.js (PR 14409 follow-up) #14668 Remove the addLinkAttributes warnings in the Annotation/XFA-layers (PR 14092 follow-up) #14665 Convert the BasePreferences class to use private fields #14669 Replace dir-dependent padding-left/padding-right/text-align with logical properties #14676 Remove the custom grab/grabbing cursor image files #14678 Convert the PDFDocumentProperties class to use private methods #14675 Build the web/viewer.css file used in the development viewer (i.e. gulp server) #14682 [gulpfile.js] Use the regular defines in the preprocessCSS function #14688 Add general iteration support in the RefSet and RefSetCache classes #14683 [src/display/api.js] Simplify the sendTest function, used with Worker initialization (PR 14291 follow-up) #14689 Slightly simplify the PDFFindController._extractText method, and convert all "private" methods into proper ones #14670 Replace dir-dependent margin/margin-left/margin-right with logical properties #14671 Replace dir-dependent float with logical properties #14692 [JS] - Parse a date in using the given format first and then try the default date parser #14695 Update packages and translations #14690 Replace dir-dependent left/right with logical properties #14704 Convert the OverlayManager class to use private fields/methods #14699 Slightly improve validation of (some) parameters in getDocument #14691 Replace dir-dependent border-rules with logical properties #14693 Remove the remaining dir-dependent CSS rules #14717 Change the type of the container property, in the TextLayerRenderParameters typedef (issue 14716) #14715 Avoid the textLayer becoming visible in high contrast mode (issue 13230) #14703 [text selection] Add the whitespaces present in the pdf in the text chunk #14720 [Annotations] Add support for printing/saving choice list with multiple selections #14710 Convert the existing overlays to use <dialog> elements (issue 14698) #14733 Use String.prototype.repeat() in a couple of spots #14735 [Annotations] Some annotations can have their values stored in the xfa:datasets #14734 Don't manually convert setAttribute values to strings (PR 14554 follow-up) #14738 Decode non-ASCII values found in the xfa:datasets (PR 14735 follow-up) #14742 Replace most loops in web/debugger.js with for...of loops #14744 Update GitHub Actions workflow steps/dependencies/translations to the most recent versions #14745 Convert web/debugger.js to a basic module #14739 Refactor some xfa*** getters in document.js #14663 [GENERIC viewer] Try to improve a11y, for search results, in the findbar (issue 14525) #14761 Use a bit more optional chaining in the viewer #14751 Re-factor the isLittleEndian/isEvalSupported caching #14750 Remove the BaseViewer._getCurrentVisiblePage helper method #14754 [api-minor] Improve performance with image masks (bug 857031) #14766 Improve performance of applyMaskImageData #14764 Correct typos #14765 Simplify handling of requestFullscreen errors in PDFPresentationMode #14767 [GENERIC viewer] Re-factor the fileInput initialization #14769 Remove unnecessary @media CSS rules (PR 8993 follow-up) #14770 Always remove the sidebarMoving CSS class when the sidebar is closed #14771 Simplify the dialog::backdrop CSS rules (PR 14710 follow-up) #14772 Remove/simplify some CSS rules #14773 Remove some dropdownToolbarButton-related CSS rules #14780 Replace the --viewport-scale-factor CSS variable #14722 PDFScriptingManager: Bind mousedown listener with capture=true #14784 Improve performance of shared/utils.js::intersect (bug 1135277) #14785 Update core-js to allow removing a structuredClone work-around #14777 [api-minor] Improve performances with image masks (bug 857031) #14796 [api-minor] Simplify min/max computations in constructPath (bug 1135277) #14797 Don't clip when the clip path is empty (issue #12306) #14799 Fix clipping issue with pattern (follow-up of #14797) #14788 Move the PDFBug-related CSS from viewer.css and into its own file #14790 Remove some outdated CSS rules related to printing #14792 Update packages and translations #14795 Reduce more duplication in the CSS #14793 Simplify spread-mode handling for the PAGE scroll-mode #14801 [GENERIC viewer] Simplify the styling of the previous/next findbar buttons #14803 Add support for the /Catalog Base-URI when resolving URLs (issue 14802) #14794 Remove the PresentationMode special-case from BaseViewer.update #14810 Stop bundling errorWrapper CSS rules in the MOZCENTRAL build #14817 Some more, small, CSS clean-up #14818 Use correct case for JavaScript #14815 Ignore non-Stream /SMask-entries when parsing images (issue 14814) #14828 Use more for...of loops in the viewer #14827 Simplify setting of spacing at the left/right edges of the toolbar(s) #14823 Ignore invalid /Encoding-entries when parsing fonts (issue 14821) #14825 Ensure that worker-thread image caching doesn't break optional content (issue 14824) #14829 Remove unnecessary print CSS rules #14831 Add a helper function for incrementing the count of cached ImageMasks #14836 Don't use pref 'browser.download.improvements_to_download_panel' in Firefox (#14822) #14848 Support destinations in NameTrees with encoded keys (issue 14847) #14833 Stop bundling the openFile-buttons in the MOZCENTRAL build #14835 Clean-up some CSS rules for the various toolbar separators #14856 [api-minor] Remove the forceClamped-functionality in the Streams (issue 14849) #14853 Use integer coordinates when drawing images (bug 1264608, issue #3351) #14854 Remove redundant class names from the button DOM-elements #14857 Inline the webViewerOpenFileViaURL function in webViewerInitialized #14860 Update dependencies and translations #14858 Use Path2D, if available, when rendering Type3-fonts (bug 810214) #14861 Pin the es-module-shims dependency to version 1.4.7 #14863 Update quickjs to revision 2788d71e823b522b178db3b3660ce93689534e6d #14865 Support encoded dest-strings in /GoTo destination dictionaries (issue 14864) #14866 Immediately release the temporary Uint8Arrays used during Type3-compilation #14869 [JS] Fix few bugs present in the pdf for issue #14862 #14873 Replace the AnnotationStorage.lastModified-getter with a proper hash-method #14870 Only bundle the src/display/node_utils.js file in GENERIC-builds #14871 Re-factor the PresentationMode handling in BaseViewer.#ensurePageViewVisible #14874 [api-minor] Improve pdf reading in high contrast mode #14877 Add (basic) support for Spread modes in PresentationMode (issue 14749) #14880 Introduce a --viewer-container-height CSS variable to simplify the code #14884 Simplify the "fileattachmentannotation"-event handling a little bit #14882 Add support for TrueType format 12 cmaps (issue 14881) #14887 Ignore pageColors when the background/foreground is identical (PR 14874 follow-up) #14885 Stop bundling PDFViewerApplication.{unbindEvents, unbindWindowEvents} in MOZCENTRAL builds #14888 Try to fix dispatching of "attachmentsloaded"-events, when the document contains no "regular" attachments (PR 8788, 12163 follow-up) #14886 Use the regular preprocess-function for the CSS files as well #14890 [JS] Formatted value has to be a string when neither null nor undefined #14903 Update the preprocess-function to avoid adding trailing new-lines (issue 14902) #14904 Avoid the preprocess-function adding consecutive blank lines #14899 [api-minor] Include line endings in Line/Polyline Annotation-data (issue 14896) #14894 Try to remove the mozOpaque canvas-property (PR 6551 follow-up) #14911 Use TypedArray.prototype.fill() a bit more in the code-base #14910 Ensure that setting the width of the zoom dropdown works correctly (PR 14028 follow-up) #14918 [api-minor] Modernize and simplify the ProgressBar class

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.14.305-dist.zip(5.38 MB)
    pdfjs-2.14.305-legacy-dist.zip(5.88 MB)
  • v2.13.216(Feb 27, 2022)

    This release features improvements for searching in the viewer: searching with/without diacritics, arbitrary whitespace matching, searching for hyphenated words when linebreaks are present and searching around punctuation characters. Moreover, this release contains many bugfixes and optimizations, in particular for annotations, font/image conversion, SMask rendering, text layer rendering and TypeScript definitions.

    Changes since v2.12.313:

    #13261 [api-minor] Support search with or without diacritics (bug 1508345, bug 916883, bug 1651113) #14389 Bump versions in pdfjs.config #14388 Unblock the "load" event in inactive windows/tabs (bug 1746213, PR 11646 follow-up) #14401 Update packages and translations #14391 Handle non-integer Annotation border widths correctly (issue 14203) #14400 [api-minor] Convert Catalog.getPageDict to an asynchronous method #14409 Improve caching for the Catalog.getPageIndex method (PR 13319 follow-up) #14411 Convert Catalog.getAllPageDicts to an async method #14413 Drop the beta logic from the Gulpfile/website/pdfjs.config file #14417 Revert "Disable failing print actions integration test in Firefox" #14418 Use positive dimensions for text chunks in the text layer (issue #14415) #14429 [JS] Fix few errors around AFSpecial_Keystroke #14423 Remove the eventBus parameter from getViewerConfiguration #14424 [api-minor] Move addLinkAttributes, LinkTarget, and removeNullCharacters into the viewer (PR 14092 follow-up) #14432 Update packages and translations #14443 Prevent run-time errors in BaseViewer when it's falling back to SimpleLinkService (issue 14442, PR 14295 follow-up) #14450 Add (basic) UTF-8 support in the stringToPDFString helper function (issue 14449) #14446 Expose even more API-functionality in the TypeScript definitions (issue 14435, PR 14013 follow-up) #14454 Replace some assert usage with unreachable in the src/shared/util.js file #14453 Dispatch a "documenterror" event in PDFViewerApplication._documentError (issue 14451) #14439 Ignore Annotations with empty /Rect-entries in the display-layer (issue 14438) #14448 Prevent circular references in Type3 fonts #14428 Use the correct dimension to know if we have to add an EOL in vertical mode #14455 Make the normalizeWhitespace handling, in the PartialEvaluator, more efficient (PR 14428 follow-up) #14457 Implement a unit test for getCharUnicodeCategory in src/core/unicode.js (PR 14428 follow-up) #14456 Font renderer - get int8 instead of uint8 in composite glyphes (bug 1749563) #14464 Support Type1 font files with incomplete /CharStrings definitions (issue 14462) #14430 [JS] Use beforeinput event to trigger a keystroke event in the sandbox #14487 Remove the out.pdf file (PR 14430 follow-up) #14489 Fix scripting test related to keystroke event #14483 Remove the invisible format marks from the text chunks #14479 Update packages and translations #14490 Add a (global) cache to the getCharUnicodeCategory function #14495 web: Read WheelEvent.deltaMode before deltas. #14500 Take into account all rotations before comparing glyph positions #14491 fix for lines (stroke) are rendered too thick (Bug 1743245) #14506 Update the year in the license_header files #14392 Polyfill structuredClone with core-js (PR 13948 follow-up) #14507 Bump copy-props from 2.0.4 to 2.0.5 #14508 Bump nanoid from 3.1.30 to 3.2.0 #14513 Update quickjs sandbox #14510 [api-minor] Annotations - Adjust the font size in text field in considering the total width (bug 1721335) #14517 Disable the browser-tests, during gulp makeref, in Google Chrome on the Windows bot (PR 14392 follow-up) #14516 [UI] Avoid to have buttons in hover state after having been clicked (bug 836732) #14518 Remove the MBTA-pretax-form-July2012 browser-test since it's a duplicate #14522 Remove the xfa_bug1716838 browser-test since it's a duplicate #14515 [api-minor] Remove support for browsers/environments without fully working URL.createObjectURL implementations #14527 [api-minor] Remove the normalizeWhitespace option in the PDFPageProxy.{getTextContent, streamTextContent} methods (issue 14519, PR 14428 follow-up) #14535 [GENERIC viewer] Use consistent casing, for the labels, in the findbar #14532 [GENERIC viewer] Remove the moz-prefixed FullScreen API usage from the viewer #14530 Avoid the findResultsCount span taking up (vertical) space when hidden (PR 13261 follow-up) #14537 Update packages and translations #14539 Bump simple-get from 3.1.0 to 3.1.1 #14538 [api-minor] Update the minimum supported browser versions #14548 [api-minor] Ensure that the PDFDocumentLoadingTask-promise is rejected when cancelling the PasswordPrompt (bug 1754421) #14547 Update the file used with the xfa_bug1720182 test-case #14543 Let Lexer.getNumber treat a single minus sign as zero (bug 1753983) #14551 [api-minor] Stop exposing the createObjectURL helper function in the API #14557 Remove unnecessary font-size CSS rule from the html element (issue 14555, PR 3794 follow-up) #14558 Remove the UTF-8 fallback, when TextDecoder is missing, from the Content-Disposition parser #14560 [api-minor] Remove the, in legacy builds, bundled ReadableStream polyfill #14559 Revert "Don't block origin-less blob:-URLs in hosted viewer" #14564 [api-minor] Don't add in the text content the chars which are out-of-page (bug 1755201) #14563 [Search] Some matches were incorrectly shifted because of some '-\n' #14572 Add a missing string-check in the _collectJS helper function #14566 Miscellaneous small viewer clean-up #14569 Fix canvas state getting out of sync from smasks. (bug 1755507) #14581 Use the (viewer) parseQueryString helper function in the reference tests #14580 Change PixelsPerInch to a class with static properties (issue 14579) #14578 Remove the backingStorePixelRatio-part of the getOutputScale helper function #14575 Remove the isStream helper function #14577 Remove the isRef helper function #14584 Update packages and translations #14585 Improve the PDFObjects class #14594 Prefer instanceof ... rather than calling isCmd/isDict/isName with one argument #14596 Remove the isNum helper function #14595 Update the support information for structuredClone (PR 14392 follow-up) #14588 Remove old prefixed CSS rules used with text tests #14597 Ensure that Dict.set only accepts string keys #14598 Re-factor the Catalog.viewerPreferences method and remove the isBool helper function #14545 Generate test images at different output scales. #14605 Simplify the decodeFontData/encodeFontData font-test helper functions #14608 Don't close window from test driver. #14609 Improvements to the reftest analyzer. #14599 Ensure that Cmd/Name is only initialized with string arguments #14600 [api-minor] Add validation for the PDFDocumentProxy.getPageIndex method #14607 Simplify the wrapReason helper function #14606 Only support the standard, unprefixed, Fullscreen API in the default viewer #14602 Re-factor the PDFDocument.documentInfo method, and remove the isString helper function #14610 [JPEG 2000] Add support for resetContextProbabilities (bug 1731483) #14611 Remove the JSDocs "External: Promise"-page, since Promises are now a standard feature #14612 Add the caniuse-lite package

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.13.216-dist.zip(5.35 MB)
    pdfjs-2.13.216-legacy-dist.zip(5.85 MB)
  • v2.12.313(Dec 19, 2021)

    This release features improved XFA support, improved pattern/tiling support, rich text annotation support, a new page scrolling mode in the viewer and many other bugfixes and optimizations.

    Changes since v2.11.338:

    #14097 Bump versions in pdfjs.config #14099 Update packages and translations #14101 [Regression] Fix comb fields scrolling when the last character is entered (PR 14049 follow-up) #14111 Take the /CIDToGIDMap data into account when computing the hash, in PartialEvaluator.preEvaluateFont, for composite fonts (bug 1734802) #14106 Empty name is allowed in ISO 32000 #14108 For Annotations that define a closed area, make all of it toggle the PopupAnnotation (issue 14107) #14118 Implement TrueType character map "format 2" (fixes #14117) #14116 Use even more optional chaining in the src/display/api.js file #14134 Convert examples/node/pdf2png/pdf2png.js to await/async #14138 Convert examples/learning/helloworld.html to await/async #14143 docs: Fix grammatical error #14141 Convert examples/text-only/pdf2svg.js to await/async #14145 XFA - Embedded image is missing #14148 Ensure that the EditorConfig rules apply to *.json and *.pdf.link files as well #14131 Ensure that pre-rendering works correctly with spreadModes at higher zoom levels #14112 Add a new Page scrolling mode (issue 2638, 8952, 10907) #14149 Convert examples/learning/helloworld64.html to await/async #14103 [api-minor] Change PDFFindController to use the "find"-event directly (issue 12731) #14152 Fix a xfaFaxtory typo in the shadowing in the PDFDocument.xfaFactory getter, and some other clean-up #14166 Ignore Square/Circle-annnotations with a zero borderWidth when creating a fallback appearance stream (issue 14164) #14114 [api-minor] Include the /Lang-property in the documentInfo, and use it in the viewer (issue 14110) #14154 Update packages and translations #14155 Revert "For mozcentral use Firefox color theme instead of system theme." since -moz-toolbar-prefers-color-scheme was removed #14160 Fix pattern handling regression in SVGGraphics (PR 13770 follow-up) #14159 Convert examples/node/pdf2svg.js to await/async #14125 #14174 Prevent double-rendering borders for PushButton-annotations (PR 14083 follow-up) #14167 Convert examples/image_decoders/jpeg_viewer.js to await/async #14123 #14171 Prevent run-time errors in Node.js versions with URL.createObjectURL support (issue 14170) #14162 Indent the stepper on save/restore. #14175 Use a new method for handling soft masks. #14178 Update the browserslist database #14156 Add support for modern ECMAScript class features #14158 Improve pre-rendering at the start/end of the document #14181 Converted simpleviewer.js to await/async #14199 Avoid to display download panel during integration tests #14189 [api-minor] Implement securityHandler in the scripting API (bug 1731578) #14192 [Regression] Prevent breaking errors when opening a new document in the GENERIC viewer (PR 14158 follow-up) #14191 Ignore pageLabels, in the viewer, when they're all empty #14180 Handle ranges that "overflow" the last byte in CMap.mapBfRange (bug 1627427) #14153 Fix XFA links (bug 1735738) #14204 Remove the shadowViewer used with Page scrolling #14201 Use the correct border-style for Annotations, when a dash array is specified (bug 1219400) #14207 JS - Avoid a popup to ask for specific version of Acrobat #14210 Update packages and translations #14182 [api-minor] Support rich content in markup annotation #14212 Add a RTL-text reference test (issue 10301) #14217 [Firefox] Handle errors if loading failed before the "supportsRangedLoading" message was sent (bug 1732141) #14221 Use BaseViewer.previousPage more in the default viewer (PR 12870 follow-up) #14225 Avoid doing unnecessary checks, when pre-rendering page layouts with "holes" (PR 14131 follow-up) #14228 Reset path bounding box tracking when starting a new path. #14213 Tweak the Bidi-detection heuristics for very short RTL strings (issue 11656) #14219 Let getVisibleElements return a Set containing the visible element ids #14232 Use correct matrix for patterns with showText. #14218 XFA subform with occur min=0 and no bound data displaying. #14238 Add a couple of basic unit-tests for PDFPageViewBuffer #14241 Don't double apply a group xobject's bbox. #14230 Create shading patterns the size of the current path. (bug 1722807) #14244 Prevent mobile devices from interfering with the textLayer-elements (issue 14243) #14240 XFA - Get each page asynchronously in order to avoid blocking the event loop (#14014) #14245 Convert PDFPageViewBuffer to a standard class, and use a Set internally #14250 XFA - Encode tag names in UTF-8 when saving (fix #14249) #14239 XFA - Fix a breakBefore issue when target is a contentArea and startNew is 1 (bug 1739502) #14209 [Google Chrome] Ensure that markedContent spans are placed in the top-left corner (issue 14205) #14258 Always prefer abbreviated keys, over full ones, when doing any dictionary lookups (issue 14256) #14265 XFA - Avoid an exception when looking for a font in a parent node #14266 Don't consider space as real space when there is an extra spacing (bug 931481) #14270 When parsing corrupt documents without any trailer-dictionary, fallback to the "top"-dictionary (issue 14269) #14268 Remove non-displayable chars from outline title (#14267) #14253 [Chromium addon] Add the Page scrolling mode to the options (PR 14112 follow-up) #14260 Report "pageInfo" telemetry once, rather than for each rendered page #14271 Parse query string in using URLSearchParams #14255 Convert GrabToPan to a standard class #14273 Update packages and translations #14247 [api-minor] Render pushbuttons on their own canvas (bug 1737260) #14280 Slightly optimize spreadMode toggling with ScrollMode.PAGE set (PR 14112 follow-up) #14278 Replace the remaining Node.removeChild() instances with Element.remove() #14276 Only show the loadingIcon-spinner on visible pages (issue 14242) #14262 Include the /Lang-property, when it exists, in the StructTree-data (issue 14261) #14229 Add an easy way to log to the terminal during browser tests. #14291 [api-minor] Only use Workers when postMessage transfers are supported (PR 11123 follow-up) #14294 [api-minor] Replace PDFDocumentProxy.getStats with a synchronous PDFDocumentProxy.stats getter #14295 Remove the {BaseViewer, PDFThumbnailViewer}._pagesRequests caches #14299 Convert examples/components/pageviewer.js to await/async (issue 14127) #14304 Ensure that ChunkedStream won't attempt to request data beyond the document size (issue 14303) #14298 Center pages vertically in PresentationMode (issue 10906) #14310 Abort parsing when the XRef /W-array contain bogus entries (issue 14303) #14314 [Regression] Prevent errors, during loading, in the viewer for XFA-documents (PR 14295 follow-up) #14318 Handle sub/super-scripts in rich text #14319 XFA - Draw arcs correctly #14313 Change the _pagePromises cache, in the worker, from an Array to a Map #14311 [api-minor] Validate the /Pages-tree /Count entry during document initialization (issue 14303) #14320 Update packages and translations #14312 Prevent circular references in XRef tables from hanging the worker-thread (issue 14303) #14321 Upgrade to Puppeteer 12 #14333 Handle errors correctly when data lookup fails during /Pages-tree parsing (issue 14303) #14325 Remove the unused skipCount parameter from Catalog.getPageDict (PR 14311 follow-up) #14328 Update (primarily) the Node.js examples to release page resources #14335 [Regression] Eagerly fetch/parse the entire /Pages-tree in corrupt documents (issue 14303, PR 14311 follow-up) #14324 Enforce PAGE-scrolling for very large/long documents (bug 1588435, PR 11263 follow-up) #14341 Ensure that the shadow helper function is passed a valid property (PR 14152 follow-up) #14340 Handle errors when fetching the raw /Metadata (issue 14305) #14338 [api-minor] Clear all caches in XRef.indexObjects, and improve /Root dictionary validation in XRef.parse (issue 14303) #14339 Add a (linked) test-case for issue 8019 #14345 Ensure that the viewer handles BaseViewer initialization failures #14344 Modernize the test driver #14348 Add a (linked) test-case for issue 8022 #14347 Improve caching in Catalog.getPageDict (PR 8207 follow-up) #14350 Prevent an infinite loop when parsing corrupt /CCITTFaxDecode data (issue 14305) #14354 Further improve caching in Catalog.getPageDict, for disableAutoFetch mode (PR 8207 follow-up) #14355 Change WorkerTransport.{pageCache, pagePromises} from an Array to a Map #14358 Improve PDFDocument.checkLastPage/Catalog.getAllPageDicts for documents with corrupt XRef tables (PR 14311, 14335 follow-up) #14359 Avoid overloading the worker-thread during eager page initialization in the viewer (PR 11263 follow-up) #14361 Upgrade Node.js to version 16 in the CI workflow #14360 Update packages and translations #14362 Support disabling of form editing when pdfjs.enablePermissions is set (issue 14356) #14364 Only call PDFDocumentProxy.getPermissions, in the viewer, when pdfjs.enablePermissions is set (PR 14362 follow-up) #14367 Disable failing print actions integration test in Firefox #14368 Consistently use string arguments for page.waitForFunction calls and upgrade to Puppeteer 13.0.0 #14380 Move the EventBus, and related functionality, into its own file #14372 Move the /Lang handling into the BaseViewer (PR 14114 follow-up) #14370 Slightly reduce asynchronicity in the Catalog.getPageDict method (PR 14338 follow-up) #14386 Ignore negative /FitH parameters in the viewer (issue 14385) #14373 [api-minor] Fix broken/missing JSDocs and typedefs, to allow updating TypeScript to the latest version (issue 14342) #14387 Modernize the test utilities

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.12.313-dist.zip(5.17 MB)
    pdfjs-2.12.313-legacy-dist.zip(5.79 MB)
  • v2.11.338(Oct 2, 2021)

    This release features improved XFA support (enabled by default now), improved annotations/forms support and other bugfixes and optimizations.

    Changes since v2.10.377:

    #13793 Bump versions in pdfjs.config #13792 Remove the remaining closure in the src/display/canvas.js file #13795 XFA - Elements created outside of XML must have all their properties (bug 1722029) #13801 Access navigator safely in the src/display/annotation_layer.js file #13804 Move the compatibilityParams into the web/app_options.js file #13807 XFA - Get the full value when binding and not only the 1st line (bug 1718725) #13796 Allow StreamsSequenceStream.readBlock to skip sub-streams with errors (issue 13794) #13806 XFA - Fix auto-sized fields (bug 1722030) #13815 XFA - Fix font scale factors (bug 1720888) #13808 Improve caching of shading patterns. (bug 1721949) #13819 XFA - Avoid an error when an exdata is a string (bug 1723114) #13816 [api-minor] Remove the separate enableScripting option in BaseViewer #13813 Remove a couple of closures in the src/display/api.js file #13822 Prevent "Uncaught promise" messages in the console when cancelling (some) ReadableStreams #13824 When no "V" entry exists, let the fieldValue fallback to the "DV" entry (issue 13823) #13828 Introduce the GitHub Advanced Security workflow #13830 Improve the code analysis workflow with quality checks #13833 Make worker-loader optional as peerDependencies. Close #13825. #13836 Fix inefficient regular expressions in external/cmapscompress/parse.js #13831 Change the parseQueryString function to return a Map rather than an Object (issue 13829) #13837 Implement unit tests for the parseQueryString utility function #13839 Fix a broken regular expression in the docId unit-test (issue 13838, PR 13813 follow-up) #13841 Allow customization of theme in Chrome extension + set default theme #13842 Visually hide br in text selections #13847 Remove useless assignment of availableSpace in the src/core/xfa/template.js file (issue 13829, 13835) #13852 XFA - Page can be too small when printing (bug 1723705) #13860 Bump tar from 4.4.8 to 4.4.15 #13859 Remove the isEOF helper function and slightly re-factor EOF #13848 Remove the LGTM configuration and inline disable comments (issue 13829) #13854 Prevent breaking errors when an optional content group is undefined (issue 13851) #13846 Add a special gulp xfatest command, to limit the ref-tests to only XFA-documents (issue 13744) #13858 Add aria-labels to XFA form elements. (bug 1723422) #13864 [XFA] Add alt text for images. (bug 1723418) #13856 XFA - Avoid to put something in very small areas #13868 Annotation & XFA: Scale the font size in choicelist using zoom factor (bug 1715996) #13875 Annotation & XFA: Add focus outlines on different fields (bug 1723615, bug 1718528) #13869 Enable linting in the test/resources/ folder, and fix the "Remote property injection" warning (issue 13862) #13874 Update the Annotation --zoom-factor CSS variable when PDFPageView is used standalone (PR 13868 follow-up) #13873 XFA - Support aria heading and table structure. (bug 1723421) (bug 1723425) #13880 Fix typo in cff_parser_spec.js #13881 XFA - Elements under an area must be bound (bug 1723734) #13879 Fix the global variable definitions in test/resources/reftest-analyzer.js (issue 13862) #13867 [api-minor] Re-factor the internal renderingIntent, and change the default intent value in the PDFPageProxy.getAnnotations method #13882 [api-minor] Remove the closure from the PDFWorker class, in the src/display/api.js file #13883 Improve caching of Annotations-data, by using a Map, in the API #13884 Update packages and translations #13887 Bump path-parse from 1.0.5 to 1.0.7 #13890 Update some deprecated ESLint rules #13886 Re-factor the BaseException.name handling, and clean-up some code #13896 Simplify the ReadableStream polyfill #13892 Move some validation, in Dict.merge, used during merging of sub-dictionaries (PR 13775 follow-up) #13900 [api-minor] Stop translating logical assignment in non-legacy builds (PR 12887 follow-up) #13911 Ensure that the TESTING define can always be overridden in gulpfile.js #13913 Fix pdf_viewer definitions #13905 Re-factor loadAndEnablePDFBug and PDFBug.init #13904 Re-factor the LocalTilingPatternCache to cache by Ref rather than Name (PR 12458 follow-up, issue 13780) #13899 [Regression] Re-factor the internal includeAnnotationStorage handling, since it's currently subtly wrong #13920 Extend the glyph maps for standard respectively Calibri fonts (issue 13916) #13921 Update packages and translations #13922 Enable the ESLint object-shorthand rule in the extensions/chromium/-folder #13908 [api-minor] XFA - Support text search in XFA documents. #13923 [api-minor] Introduce a new annotationMode-option, in PDFPageProxy.{render, getOperatorList} #13934 Remove the IPDFHistory interface #13935 A couple of small TextHighlighter/TextLayerBuilder tweaks (PR 13908 follow-up) #13939 Remove the npm test-command #13930 Fix Viewer API definitions and include in CI #13940 Simplify the PDFViewerApplication.supportsFullscreen getter #13933 Fix saving of XFA checkboxes. (bug 1726381) #13941 Ensure that PasswordException is handled correctly in the wrapReason function #13942 Export the XFA/StructTree-layers in the viewer components #13943 Use async a bit more in the API #13944 Re-factor the setPDFNetworkStreamFactory usage for the unit-tests (PR 13549 follow-up) #13937 Fix handling of fetch errors #13932 Support Optional Content in Image-/XObjects (issue 13931) #13949 Only use base encoding if it's populated. (bug 1727053) #13951 Bump tar from 4.4.15 to 4.4.19 #13945 Implement PDFNetworkStreamRangeRequestReader._onError, to handle range request errors with XMLHttpRequest (issue 9883) #13952 Extend getNonStdFontMap for non-embedded versions of the ItcSymbol font (issue 11532) #13955 Always prefer the post-table for TrueType fonts with (0, x) cmap-tables (issue 13433) #13959 Correctly pad strings when saving an encrypted pdf (bug 1726789) #13967 XFA - Overwrite AcroForm dictionary when saving if no datasets in XFA (bug 1720179) #13966 XFA - Created data node mustn't belong to datasets namespace #13970 Fallback to the /ToUnicode map for TrueType fonts with (3, 1) and (1, 0) cmap-tables (issue 13316) #13961 Simplify some regular expressions #13973 [api-minor] Change {PDFPageView, PDFThumbnailView}.update to take a parameter object #13972 Treat all content as visible when no optional content groups are defined (issue 13971) #13975 Update packages and translations #13976 Reduce the size of TextLayerRenderTask._textDivProperties in "regular" text-selection mode #13988 Avoid an error in integration test because of a locale different of en-US #13985 Improve glyph mapping for non-embedded composite standard fonts (issue 11088) #13992 XFA - Remove the checked attribute from the checkbox when unchecked (bug 1729877) #13995 XFA - Handle $record shorcut in SOM expression (issue #13994) #13996 Make verifyManifestFiles fail for non-linked test-cases with a "link": true-entry #13991 Enable/disable image smoothing based on image interpolate value. (bug 1722191) #14000 Re-factor the CSS_PIXELS_PER_INCH/PDF_PIXELS_PER_INCH exports (PR 13991 follow-up) #13993 Don't create PDFViewerApplication.pdfHistory when the browsing history is disabled #13977 [api-minor] Reduce postMessage overhead, in PartialEvaluator.getTextContent, by sending text chunks in batches (issue 13962) #13983 Update the learning/ examples with basic HiDPI-screen support #14004 [CRX] enableScripting=false by default in Chrome extension #14002 Let Lexer.getObj return a dummy-Cmd for commands that start with a non-visible ASCII character (issue 13999) #13998 Write boolean value when saving a form (bug 1729971) #14006 [src/core/writer.js] Remove unnecessary string-wrapping for boolean values in writeValue (PR 13998 follow-up) #14007 [src/core/writer.js] Support null values in the writeValue function #14018 XFA - Don't create images for unsupported mime types #14027 Annotation - Checkboxes with the same name and export values must be in unison #14028 Use CSS variables for setting the width of the zoom dropdown (PR 11570 follow-up) #13984 Enable XFA by default in the viewer, and components/ examples (issue 13968) #14025 Improve glyph mapping for non-embedded composite standard fonts with a /CIDToGIDMap (issue 11915) #14035 Annotation - For checkboxes, get field value from AS (if any) instead of V (bug 1722036) #14040 JS - Avoid the Stay/Leave popup when clicking on a button with a JS action #14038 JS - Implement few possibilities with app.execMenuItem (bug 1724399) #14043 Re-factor the EventBus and isInAutomation handling (PR 11655 follow-up) #14013 Improve the API unit-tests, and try to expose more API-functionality in the TypeScript definitions #14045 XFA - Only warn about the wrong xfa type when there is an xfa thing #14005 [GENERIC viewer] Always show the Download-buttons, to allow saving of forms (issue 13997) #14044 Annotations - Avoid empty value in text field when storage contains something for it (bug 1719148) #14041 Support cmaps with only CID characters, when building the ToUnicode-map (issue 9367) #14052 Update packages and translations #14050 Tweak how fonts with an /Encoding are handled in adjustToUnicode (issue 14048, PR 13277 follow-up) #14053 Move the zoomIn/zoomOut functionality into BaseViewer (PR 14038 follow-up) #14056 Correctly validate URLs in XFA documents (bug 1731240) #14055 Add PDF_TO_CSS_UNITS to the PixelsPerInch-structure #14058 [api-minor] Change EventBus.dispatch to only support one data-argument #14063 [GENERIC viewer] Warn about AppOptions being overridden by Preferences during loading #14023 Re-factor document.getElementsByName lookups in the AnnotationLayer (issue 14003) #14066 Print a special warning message, in the viewer, for XFA Foreground documents #14068 Fix typo "_annotatationMode" => "_annotationMode" #14067 Don't save anything in XFA entry if no XFA! (bug 1732344) #14042 Fix dialogs with forced colors (bug 1722984) #14072 XFA - Create a new page in case of overflow #14073 XFA - Bind items when there's a bindItems entry #14069 Mark the paintJpegXObject operator as deprecated (PR 11601 follow-up) #14070 Some small readability improvements in the MessageHandler code #14065 [api-minor] Stop exporting, by default, a few additional Font properties (PR 11777 follow-up) #14074 [api-minor] Add basic support for RTL text-content in PopupAnnotations (issue 14046) #14064 Fallback to font name matching, when checking for serif fonts (issue 13845) #14036 Annotation - Some checkboxes have an empty N dictionary #14077 Fix issues in driver.js when getting css sheets #14076 XFA - Add element in button when an url is detected (bug 1716758) #14081 [api-minor] Move the addDefaultProtocolToUrl/tryConvertUrlEncoding functionality into the createValidAbsoluteUrl function #14049 Annotation - Use border and background colors from MK dictionary #14091 Add the missing pdf file for the test in the PR #14049 #14083 AcroForm: Add support for ResetForm action #14095 Replace a couple of Array.prototype.forEach-invocations with for..of instead #14057 Support CMap-data with only strings, when parsing TrueType composite fonts (bug 920426) #14092 [api-minor] Ensure that various URL-related options are applied in the xfaLayer too #14096 Pre-render one additional page when spreadModes are enabled

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.11.338-dist.zip(5.14 MB)
    pdfjs-2.11.338-legacy-dist.zip(5.73 MB)
  • v2.10.377(Jul 25, 2021)

    This release features improved XFA support, improved pattern rendering and other bugfixes and optimizations.

    Changes since v2.9.359:

    #13464 Bump versions in pdfjs.config #13466 Fix typo in template.js #13465 Some -es5/-legacy renaming clean-up, and deprecated API options removal (PR 12978, PR 13207 follow-up) #13437 XFA - Move the fake HTML representation of XFA from the worker to the main thread #13472 Don't change options of the globally used PartialEvaluator in the "should render checkbox with fallback font for printing" unit-test #13411 XFA - Add support to print XFA forms #13476 Update Puppeteer to version 10 #13451 XFA - Use native radio and checkbox buttons #13480 [GENERIC viewer] Fix printing regression from PR 13411 #13489 Add hasEOL to the TextItem typedef in the API (PR 13257 follow-up) #13478 Fix find highlighting regression from #13306. #13482 Fix scrolling of search results in documents with marked content (bug 1714183) #13473 XFA - Implement usehref support #13492 Add normalization for Hyphen -> Hyphen-minus #13490 Miscellaneous improvements for gulpfile.js (issue 10362) #13497 Initialize HTMLResult.{FAILURE, EMPTY} lazily #13494 Add more info for showText operator in stepper. #13498 Normalize the coordinates used in SVGGraphics._makeTilingPattern (issue 12996) #13461 Improve text-selection for Type3 fonts with empty /FontBBox-entries (issue 6605) #13503 XFA - Don't bind a form node with an empty value when the data node doesn't exist #13505 Use the DOMSVGFactory, rather than manually creating the SVG-element, in createMatrix (PR 13361 follow-up) #13501 XFA - CDATA can be xml so parse it when required #13513 Bump trim-newlines from 3.0.0 to 3.0.1 #13506 XFA - Add support for reftests #13479 XFA - Fix layout issues (again) #13514 [api-minor] Fetch binary CMap data in the worker-thread, when useWorkerFetch is set #13521 [XFA] Use align-items: flex-start; to improve browser compatibility (issue 13518) #13495 XFA - Display rectangle, line and arc #13524 XFA - Don't print arrow in select #13517 XFA - Add Liberation-Sans font as a substitution for some missing fonts #13515 Cache the "raw" standard font data in the worker-thread (PR 12726 follow-up) #13525 [api-minor] Re-factor the disableFontFace fallback value, and skip initializing factories with useWorkerFetch set #13516 Always use standard font data, with disableFontFace set in the API (PR 12726 follow-up) #13502 XFA - contentarea must be on top of the other containers in a pageArea #13527 XFA - Avoid infinite loop when creating some nodes in data #13528 XFA - Handle caption with inline placement as left one #13529 Bundle the license-file for the Liberation fonts in the builds (PR 13517 follow-up) #13530 Add a DOMMatrix polyfill for Node.js environments (PR 13361 follow-up) #13532 XFA - Give all the available space to the caption in case of checkButton #13534 XFA - Flush contents when breakBefore target is 'auto' #13539 XFA - Don't show outline on focused textfields #13540 XFA - Return html element for the different possible value #13542 XFA - Center vertically radio without caption #13546 Re-factor the DOMCanvasFactory and DOMSVGFactory implementations slightly #13547 XFA - Handle correctly subformSet #13549 Remove the isFetchSupported function since the Fetch API is available in all supported browsers #13552 Update packages and translations #13548 XFA - Default fill color for rectangle is transparent #13555 XFA - Value in field can be html #13557 XFA - Fix error when creating a new data node #13559 XFA - Handle maxChars property for text fields #13563 Add basic linting of JSON files using eslint-plugin-json #13554 XFA - Add support for overflow element #13569 XFA - Container wrapper must take the visibility of the wrapped content #13565 Fix how patterns are applied to image mask objects. #13570 XFA - By default a text ui has only one line when in a field element #13560 XFA - Add the possibily to layout and measure text #13575 XFA - Fix reftest for xfa_issue13500 #13576 XFA - When no fonts in the pdf just use font size as width when measuring text #13566 XFA - Fix layout issues #13577 Remove the internal PDFScriptingManager._pageEventsReady boolean (PR 13074 follow-up) #13587 Set the default value of useSystemFonts correctly, depending on disableFontFace, in the API (PR 13516 follow-up) #13588 Add a (basic) TypeScript definitions for the viewer components (issue 13267) #13590 Stop encoding the value in the DOMElement.setAttribute method (issue 8558) #13589 Allow using the standard font data for non-Type1 fonts (issue 13585, PR 12726 follow-up) #13591 XFA - Match font family correctly #13595 XFA - Add support for access property #13593 XFA - Don't display invisible rectangle borders #13573 XFA - Fix the way to select page on breaking #13601 Revert "XFA - Fix the way to select page on breaking" #13603 Revert "Revert "XFA - Fix the way to select page on breaking"" #13592 XFA - Don't display print-only elements #13604 XFA - A prototype can have a property which needs itself to resolve a proto #13608 Bump color-string from 1.5.3 to 1.5.5 #13609 Correctly align the xfaLayer content with horizontal scrolling/spread modes #13594 XFA - Add margins if needed after having layout some text #13606 Correctly align the textLayer content with horizontal/spread scrolling modes (issue 13605) #13614 XFA - Get line height from the font #13617 Reset the IPDFLinkService.externalLinkEnabled property on document closing #13612 Support corrupt documents with empty Name-entries (issue 13610) #13613 [api-minor] Slightly tweak/improve various code related to XFA-printing #13618 XFA - Always bind root subform on root data #13622 XFA - No container stretching with lr-tb layout #13619 XFA - Add back empty subforms (which can have a background) #13624 XFA - Take into account text position in caption #13627 XFA - Save filled data in the pdf when downloading the file (Bug 1716288) #13600 Take the position of the selected element into account when scrolling matches (issue 13596) #13628 Check that TrueType (3, 0) cmap tables, for symbolic fonts, are sorted correctly (issue 13626) #13637 Update packages and translations #13638 A couple of smaller JSDocs tweaks in src/display/api.js #13642 XFA - Remove quotes of font name in xhtml #13639 XFA - Replace deprecated break element (bug 1718053) #13635 XFA - Fix width of a container with lr-tb layout (bug 1718037) #13641 XFA - Implement aspect property on image element #13644 XFA - Support non-embedded fonts without a Widths entry #13645 XFA - Choice list has no selected value by default (bug 1718241) #13616 Add PDFs from #1773 to the reftests #13640 Add non-PRODUCTION/TESTING overflow asserts to various string helper-functions (issue 6759) #13648 XFA - Don't fill when the fill element is not visible (bug 1718735) #13598 XFA - Remove empty pages #13657 Replace instanceof Object with typeof checks #13658 Don't attempt to structure clone unsupported types with workers disabled #13664 Remove the version field from the package.json file #13661 [api-minor] Support accessing both the original and modified PDF fingerprint #13662 XFA - Don't use system font when a font is not embeded but there is a substitution #13666 Enable the ESLint operator-assignment rule #13654 XFA - An image can be a stream in the pdf (bug 1718521) #13672 Revert "XFA - An image can be a stream in the pdf (bug 1718521)" #13653 XFA - Improve text layout #13665 XFA - Fix indentation for justified paragraph #13673 XFA - An image can be a stream in the pdf (bug 1718521) #13675 [test/driver.js] Ensure that Image src is set after the callbacks in resolveImages #13680 XFA - Layout correctly a subform with row layout (bug 1718740) #13684 XFA - Default background in rectangle is white #13683 Fix transformations when painting image masks and tiling patterns. #13687 XFA - Don't fail xfa loading because of a JS subexpression in SOM expressions #13649 Merge the supplemental font data files used with XFA documents #13691 XFA - Handle correctly nested containers with lr-tb layout (bug 1718670) #13693 XFA - Enable disabled fields (bug 1719464) #13694 XFA - remove unnecessary check in the handleBreak function (PR 13687 follow-up) #13692 XFA - Correctly bind global data (bug 1718725) #13700 XFA - Scale correctly images #13706 XFA - Keep xfa layer on top of the others (bug 1719629) #13703 XFA - Fix typo in factory.js #13708 XFA - Add support for traversal and traverse element #13710 XFA - Move xfa layer on top of the others (follow-up of #13706) #13690 Fixed text annotation comb input box #13696 [GENERIC viewer] Try to fixup "incomplete" language codes (issue 13689) #13699 making webpack aware of the change inside of the worker file and hash #13712 XFA - Always compute the transformed BBox values in checkDimensions (PR 13691 follow-up) #13705 XFA - Fix text positions (bug 1718741) #13715 Update packages and translations #13714 XFA - Use fake MyriadPro as a fallback for missing fonts #13717 XFA - Fix wrong vertical alignments #13718 XFA - Support assist element #13716 XFA - Avoid to have containers not pushed in the html #13720 Revert "XFA - Avoid to have containers not pushed in the html" #13723 XFA - Only the first page was printed (bug 1720159) #13721 XFA - Avoid to have containers not pushed in the html #13725 Avoid all rendering breaking completely when CanvasPattern.setTransform() is unsupported #13734 XFA - Cannot print fields with no names #13739 Remove <meta> tag only necessary for IE-compatibility #13738 Re-factor the handling of empty Name-instances (PR 13612 follow-up) #13730 Add a new "botbrowsertest" gulp-task, to allow running only the browser tests on the bots #13732 XFA - A rectangle must have the width of its parent but without inner margins #13743 XFA - Checkboxes must be printed (bug 1720182) #13745 Enable XFA by default in the development viewer #13754 Remove the IR (internal representation) part of the PDFFunction parsing #13746 [api-minor] Add intent support to the PDFPageProxy.getOperatorList method (issue 13704) #13735 Ensure that the field value, for checkboxes, refers to an existing appearance state (bug 1720411) #13761 XFA - Prevent breaking errors in Binder, when searchNode doesn't return data (issue 13756) #13763 XFA - Must use bindItems element even if there is no direct binding (bug 1720907) #13764 XFA - Add a missing method to XFAAttribute, to prevent breaking errors (issue 13748) #13768 XFA - Remove namespace from nodes under xfa:data node #13766 XFA - Handle startIndex correctly in the Template.$toHTML method (issue 13751) #13772 Include the font/integration/unit-test folders in the LGTM report #13776 Include most of the test-folder in the LGTM report (PR 13772 follow-up) #13777 XFA - SVG elements mustn't get any pointer events (bug 1721589) #13778 XFA - A field without an ui must provide a default one (bug 1718245) #13770 Improve performance of reused patterns. #13782 [api-minor] XFA - Remove the xfaLayer from the DOM when resetting pages (bug 1721977, PR 13427 follow-up) #13775 Remove some duplication in the Dict.merge method #13786 Remove a couple of small closures in src/core/ code #13784 When parsing corrupt documents, avoid inserting obviously broken data in the XRef-table (issue 13783) #13787 Fix (most) LGTM warnings #13788 Enable the no-empty-character-class and no-template-curly-in-string linting rules #13790 Update packages and translations

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.10.377-dist.zip(5.02 MB)
    pdfjs-2.10.377-legacy-dist.zip(5.61 MB)
  • v2.9.359(May 30, 2021)

    This release features improved text layer rendering (so words and whitespace better match the rendered page), improved accessibility support (for marked PDF files with structure information for screen readers), improved shading/tiling pattern rendering, displaying of digital signatures (but not verifying them), improved XFA support (which is still experimental), improved rendering of annotations without appearance streams and other bugfixes mainly regarding annotations, font rendering and scripting.

    Changes since v2.8.335:

    #13183 Bump versions in pdfjs.config #13184 Convert objects to sets in places where we only track keys #13186 Remove some deprecated code #13194 Fuzzy-match the fontName, for TrueType Collection fonts, where the "name"-table is wrong (issue 13193) #13204 Fix typo in canvas.js #13210 Cache babel source map. #13209 Remove the enableScripting option from the PDFPageView constructor #13207 [api-minor] Remove the manual passing of an AnnotationStorage-instance when calling various API-method #13171 [api-minor] Add support for basic structure tree for accessibility. #13197 Improve the image quality of thumbnails rendered by PDFThumbnailView.draw (issue 8233) #13212 Check that the correct pdfDocument is still active, before rendering the outline/attachments/layers #13214 Display widget signature #13216 Remove obsolete done callbacks from the unit tests #13220 Ensure that currentOutlineButton enabling/disabling won't depend on the exact timing of the "pagesloaded" event (PR 13212 follow-up) #13221 [api-minor] A couple of smaller PDFPageProxy.getStructTree fixes (PR 13171 follow-up) #13217 [GENERIC viewer] Display a warning message, using the errorWrapper, for documents with signatures (PR 13214 follow-up, issue 13215) #13141 XFA -- Display text content #13203 Implement high contrast mode #13223 Remove the unused "GetIsPureXfa" message handler; and avoid unnecessary parsing when no structTree is available (PR 13069 follow-up, PR 13221 follow-up) #13232 Fix annotation input focus trap regression in Safari #13234 [api-minor] Ensure that PDFDocumentProxy.hasJSActions won't fail if MissingDataExceptions are thrown during the associated worker-thread parsing #13235 Split the classes in src/core/obj.js into separate files #13238 Update the es-module-shims package to the latest version #13244 Update the postcss-calc package to the latest version #13240 Update eslint-config-prettier/eslint-plugin-unicorn packages to their latest versions #13222 Convert done callbacks to async/await in the smaller unit test files #13243 Implement visibility expressions for optional content #13246 Convert done callbacks to async/await in more unit test files #13247 Update the yargs package to the latest version #13249 [GENERIC viewer] Don't display the errorWrapper, for documents with signatures (PR 13217 follow-up) #13250 Remove the PDFViewerApplication._delayedFallback functionality #13146 XFA -- Load fonts permanently from the pdf #13254 A couple of small scripting/XFA-related tweaks in the worker-code #13253 Convert done callbacks to async/await in test/unit/api_spec.js #13258 Update packages and translations #13256 Convert done callbacks to async/await in the last two unit test files #13275 Ensure that the /Properties, used with optional content, is actually loaded before parsing the operatorList/textContent (PR 12095 follow-up) #13278 Add presentation role to text layer spans. #13277 For CFF fonts without proper ToUnicode/Encoding data, utilize the "charset"/"Encoding"-data from the font file to improve text-selection (issue 13260) #13263 Replace done callbacks in the font-tests with async/await instead #13282 Update Puppeteer to version 9 #13280 Ensure that saveDocument works if there's no /ID-entry in the PDF document (issue 13279) #13286 [JS] Use heap allocation when initializing quickjs sandbox #13283 Change NameOrNumberTree.getAll to return a Map rather than an Object #13272 Update all the text widgets having the same name with the same value #13291 Replace a bunch of Array.prototype.forEach() cases with for...of loops instead #13297 Add a note about minification to the webpack-example README (issue 13290) #13294 Enable the no-var linting rule in src/core/{cmap,image,worker}.js #13301 Support InkAnnotations without appearance streams (issue 13298) #13300 Convert the code in src/display/canvas.js to use standard classes #13304 Convert more code in src/core/ to use standard classes #13305 Implement rendering polyline/polygon annotations without appearance stream #13306 Fix position of highlighted all text. #13314 For mozcentral use Firefox color theme instead of system theme. #13310 Don't try to insert a structTree in a removed page (PR 13171 follow-up) #13257 [api-minor] Fix the way to chunk the strings #13303 Add an abstract base-class, which all the various Stream implementations inherit from #13322 Update packages and translations #13320 Add a new BaseStream.getString(...) method to replace manual bytesToString(BaseStream.getBytes(...)) calls #13321 Enable the no-var linting rule in src/core/{crypto,function}.js #13324 Fix highlighting of search results when the textLayer contains br-elements (PR 13257 follow-up, issue 13323) #13319 JS -- add support for page property in field #13274 [JS] Fix several issues found in pdf in #13269 #13333 [web/debugger.js] Enable the ESLint no-var rule #13337 [Regression] Move the super-call in the PredictorStream-constructor to prevent errors (PR 13303) #13340 Fix integration test in the windows bot #13339 Remove unnecessary closure in src/display/text_layer.js, and use standard classes #13327 Split the functionality in src/core/fonts.js into multiple files, and use standard classes #13349 Bump lodash from 4.17.19 to 4.17.21 #13341 Remove unnecessary closure in the src/core/font_renderer.js file #13352 Bump hosted-git-info from 2.6.0 to 2.8.9 #13338 Convert the src/core/{jbig2, jpg, jpx}.js files to use standard classes #13344 Enable the no-var rule in the src/core/evaluator.js file #13350 Add option enableXfa to the viewer #13347 Take the W array into account when computing the hash, in PartialEvaluator.preEvaluateFont, for composite fonts (issue 13343) #13354 Export the "raw" toUnicode-data from PartialEvaluator.preEvaluateFont #13355 Fix some integration tests #13357 Remove the disableCanvasToImageConversion functionality from PDFThumbnailView (PR 7029 follow-up) #13358 [api-minor] Remove the WebGL implementation #13364 Clean-up usage of the TESTING-define in src/pdf.sandbox.js #13363 Prevent LGTM from complaining about useless assignments (PR 12562 follow-up) #13368 Fix the Jbig2Image export for the gulp image_decoders build (PR 9729 follow-up, issue 13367) #13360 Only include the renderer-preference in builds where SVGGraphics is defined #13366 Convert the remaining functions in src/core/primitives.js to use standard classes #13361 Fix several issues with radial/axial shadings and tiling patterns. #13371 Revert "Fix the remaining no-var failures, which couldn't be handled automatically, in the src/core/evaluator.js file" (PR 13344 follow-up) #13369 Fix tiling pattern with smask. #13375 Improve the Page.content and Page.getContentStream methods #13377 Re-factor and convert the code in src/core/pattern.js to use standard classes #13379 [api-minor] Update minimum supported browser versions (PR 13361 follow-up) #13383 Update packages and translations #13380 Re-factor and convert the code in src/display/pattern_helper.js to use standard classes #13385 Convert src/core/operator_list.js to use standard classes #13386 Enable the no-var linting rule in src/core/bidi.js #13387 Fix a few safe ESLint no-var failures in src/core/evaluator.js (13371 follow-up) #13328 JS - Add support for display property #13389 Get any width (if one is present) in CFF parser #13390 XFA - Don't move glyphes in private area with non-truetype fonts #13394 Handle PI with no value in xml parser #13401 Remove some, with Prettier 2.3.0, unnecessary // prettier-ignore comments #13408 Remove focus from the zoom dropdown, when a mouse is used (bug 1300525, issue 4923) #13415 Improve handling of named destinations in out-of-order NameTrees (PR 10274 follow-up) #13416 XFA - Fix wrong function name #13419 Use the stringToBytes helper function in more places #13381 Handle errors gracefully, in PartialEvaluator.buildFontPaths, when glyph path building fails #13417 [XFA] Send URLs as strings, rather than objects (issue 1773) #13420 Drop obsolete logic from the downloadFile function in test/downloadutils.js #13421 XFA - Don't display images with a href #13402 XFA - Fix lot of layout issues #13429 Bump browserslist from 4.16.3 to 4.16.6 #13436 Re-factor FontFaceObject.getPathGenerator to use Arrays instead of strings #13435 Enable the unicorn/no-array-push-push ESLint plugin rule #13445 Fix Postscript name in font to avoid bug when saving in pdf #13450 Fix the JSDocs for PDFDocumentProxy.getPageIndex (issue 13449) #13455 Italic angle is defined clockwise in CSS when it's counterclockwise in PDF #13456 Replace clazz by classNames #13427 XFA - Add a storage to save fields values #13443 Re-factor the charsCache on Font-instances #13457 Work-around for HighlightAnnotations without a top-level /ExtGState-entry (issue 13242) #13448 Support strokeAlpha/fillAlpha when creating a fallback appearance stream (issue 6810) #13460 Update webpack import instructions #13462 Update packages and translations #13463 Bump ws from 7.4.5 to 7.4.6

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.9.359-dist.zip(4.36 MB)
    pdfjs-2.9.359-legacy-dist.zip(4.89 MB)
  • v2.8.335(Apr 5, 2021)

    This release features initial support for XFA (in addition to the support for AcroForms). Moreover, it contains lots of improvements related to scripting, text layer positioning, annotations, printing, accessibility and performance.

    Changes since v2.7.570:

    #12901 Bump versions in pdfjs.config #12826 JS -- add support for choice widget #12914 JS - QuickJS sandbox initialization must be the last evaluated string #12916 Include pdf.sandbox.js when building the pdfjs-dist files #12911 Fix text layer regression tests in using the correct line-height property #12910 Add back dir property in spans in text layer #12903 Improve global image caching for small images (PR 11912 follow-up, issue 12098) #12924 Fix font data clone error when pdfBug is enabled. #12922 Ignore globally cached images in PartialEvaluator.getTextContent (PR 11930 follow-up) #12920 fix(acroforms): pdf path in acroforms example #12931 Stop showing the fallback bar for "errorFontLoadNative" errors (PR 10539 follow-up) #12932 Stop including -ms prefixed CSS rules in GENERIC builds #12933 Stop polyfilling CSS variables in GENERIC builds #12935 Remove prefixed fullscreen properties/methods from the MOZCENTRAL builds #12879 XFA - Add a parser for XFA files #12943 Re-enable the issue6961 test-case (issue 7112) #12947 Update Puppeteer to version 6 (issue 12945) #12954 XFA -- Add attributes and children in XFAObject #12952 Don't focus the PasswordPrompt input-field on load, when the viewer is embedded in e.g. an iframe (issue 12951) #12956 Update Puppeteer to version 7 #12946 XFA -- Add template object #12944 XFA -- Update config object #12941 fix(a11y): resolve sidebar, find, toolbar missing aria-expanded and aria-controls state #12961 Use optional chaining, where possible, in the web/-folder #12965 Request all data, rather than throwing, when encountering general errors in ObjectLoader._walk (issue 9462, PR 3289 follow-up) #12966 Update packages and translations #12962 Handle errors gracefully, in PartialEvaluator.translateFont, when fetching the font file (issue 9462) #12970 Split PDFViewerApplication.error into two methods, for PDF document loading/parsing errors vs other errors (PR 11647 follow-up) #12971 Use DOM hidden property instead of attribute methods #12975 Remove the contentmenu usage, from PresentationMode, since it's no longer working #12972 [GENERIC viewer] Skip the iframe-case when checking if the container div, on BaseViewer-instances, is absolutely positioned (PR 12354 follow-up) #12973 Use Math.hypot, instead of Math.sqrt with manual squaring #12978 [api-minor] Rename -es5 to -legacy, to reduce confusion over what's actually supported (issue 12976) #12948 XFA -- Add localset object #12949 XFA -- Add other objects #12982 Update the year in the license_header files #12984 Replace a few new Date().getTime() instances with Date.now() #12981 Collect the l10n error/warning message lookup, in web/app.js, in a new helper method #12904 fix initial state of checkboxes in display layer #12987 Restore window.alert after use in scripting test #12986 Remove the unused "loading_error_indicator" l10n string (PR 2719 follow-up) #12988 Remove unneeded instanceof MissingDataException checks #12896 Modifiy the way to compute baseline to have a better match between canvas and text layer #12992 Use a more compact format for the fallback EventBus-listeners in PDFViewerApplication_initializeJavaScript #12991 Stop including unused/unnecessary code in the viewer, for MOZCENTRAL-builds #12993 [api-minor] Change the dc:subject Metadata field to an Array #12964 Avoid infinite loop when getting annotation field name #12995 Stop showing the fallback bar for "errorFontMissing" errors (PR 11218 follow-up) #12830 JS -- Fix doc.getField and add missing field methods #12936 XFA - Add a lexer/parser for FormCalc language #12998 Simplify the default value handling of renderInteractiveForms in the viewer components #12999 [api-minor] Remove support for synchronous event dispatching in LoopbackPort #12997 Move the Metadata parsing to the worker-thread #12979 XFA - Add support for prototypes #13001 Send the AnnotationStorage-data to the worker-thread as a Map #13004 Add a this-bound method for InternalRenderTask.cancel #13007 Update packages and translations #13005 JS - Fix setting a color on an annotation #13008 Allow minor and patch versions for the webpack-stream dependency again #12983 XFA -- Add support for SOM expressions #13011 Remove extra new line from HTML source. #13009 Move the opening of PDF file attachments into the DownloadManager-implementations #13019 Remove the findResultsCount-check from PDFFindBar.updateResultsCount, and unnecessary defaults from the constructor #13020 Remove the NullL10n default value from viewer components not included in the COMPONENTS-bundle #13021 Remove the, strictly unnecessary, closure and variable shadowing from createObjectURL #13014 [api-minor] Support the Content-Disposition filename in the Firefox PDF Viewer (bug 1694556, PR 9379 follow-up) #13025 Convert code in src/core/function.js to use "normal" classes #13026 Convert code in src/core/crypto.js to use "normal" classes #13024 Update Puppeteer to version 8 #13023 Fix integration test with js-colors #13029 Enable the no-var linting rule in more core files #13030 Modernize some of the code in src/core/cmap.js by using classes and async/await #13031 Implement rendering square/circle annotations without appearance stream #13032 Don't warn about actions that require scripting support in Catalog.parseDestDictionary #13033 Implement rendering line annotations without appearance stream #13039 Change the background to ensure that the sidebar is visible/readable when the viewer is narrow (issue 13036) #13045 Bump pug-code-gen from 2.0.1 to 2.0.3 #13050 Collect all l10n fallback strings, used in the viewer, in one helper function (PR 12981 follow-up) #13053 Enable scripting by default in the development viewer; remove the standalone acroforms example #13042 [api-minor] Move the viewer scripting initialization/handling into a new PDFScriptingManager class #13054 Move handling of the PageOpen/PageClose events into the PDFScriptingManager (PR 13042 follow-up) #13060 Update packages and translations #13055 JS - reset correctly radio buttons #13062 Remove the test/features folder, since it's very out of date (issue 11954) #13063 Use more optional chaining in the web/-folder (PR 12961 follow-up) #13018 XFA - Create Form DOM in merging template and data trees #13015 JS - Avoid a popup to ask for updating Acrobat. #13078 Disable intermittent unit test "creates pdf doc from non-existent URL" #13074 Re-factor the PDFScriptingManager._destroyScripting method (PR 13042 follow-up) #13081 Replace the objectFromEntries helper function with an objectFromMap one instead, and simplify the data lookup in the AnnotationStorage.getValue method #13085 Ensure that all errors are handled in rasterizeTextLayer/rasterizeAnnotationLayer #13090 Enable the ESLint no-var rule in gulpfile.js #13079 Ensure that getDocument handles Node.js Buffers more gracefully (issue 13075) #13087 Enable the ESLint no-var rule in the examples/ folder #13084 Enable the ESLint no-var rule in a few font-parsing files, and convert src/core/type1_parser.js to use "standard" classes #13092 Enable the ESLint no-var rule in the importL10n/ folder #13091 Enable the ESLint no-var rule globally #13093 Enable the ESLint no-var rule in the external/builder/ folder #13097 Enable the ESLint no-var rule in test/add_test.js #13096 Enable the ESLint no-var rule in the test/stats/ folder #13095 Enable linting of the external/cmapscompress/ folder #13098 Enable the ESLint no-var rule in the external/ folder #13094 Enable the no-var linting rule for src/core/{operator_list, pattern}.js #13101 print: Remove invalid @supports condition. #13100 print: Ensure print containers have the right size and don't create overflow. #13102 print: RFC: Center when printing a PDF with smaller size than the output page. #13104 Ensure that printing, triggered from scripting, won't accidentally throw in PDFScriptingManager._updateFromSandbox #13106 Support LineAnnotations with empty /Rect-entries (issue 6564) #13069 [api-minor]XFA - Add a layer to display XFA forms #13119 Actually reset the PDFPageProxy._xfaPromise property as intended (PR 13069 follow-up) #13120 Rotate landscape pages, during printing, by default in the viewer (enablePrintAutoRotate = true) #13116 Enable scripting by default in the viewer (PR 13053 follow-up) #13113 Ignore some scripting events which don't make sense in PresentationMode #13105 Improve memory usage around the BasePdfManager.docBaseUrl parameter (PR 7689 follow-up) #13118 Add landmark region and aria-label for each page. #13124 Tweak the pre-processor condition, for Node.js environments, in the animationStarted helper (issue 13057) #13117 Re-factor the default preferences generation to support build targets (PR 10548) #13126 Update packages and translations #13125 Don't provide the enableXfa parameter to the BaseViewer constructor, and avoid the fallback bar with enableXfa = true set (PR 13069 follow-up) #13135 Fix typo in pdf_history.js #13128 Re-factor how the BasePreferences.prefs-property is initialized; remove some indirect loops #13082 XFA - Convert some template properties into CSS ones #13149 Set CFF header to 4 when writing it because it contains 4 elements #13140 [GrabToPan] Remove more IE-specific code, and remove unconditional browser sniffing #13145 print: Improve rendering of oversized pages. #13144 [GrabToPan] Use Element.matches() rather than prefixed ...matchesSelector versions #13138 [PDFHistory] Correctly simulate an internal destination in the pushPage-method (PR 12493 follow-up) #13056 Dispatch a "Doc/WillClose" event, when scripting is enabled, when closing the document #13154 Update quickjs to revision b5e62895c619d4ffc75c9d822c8d85f1ece77e5b #13155 Move rotation normalization from PDFViewerApplication and into BaseViewer #13152 Skip extra objects in object stream in using offsets #13160 Improve handling of linked test-cases for the unit/integration suites #13133 JS - Handle correctly hierarchy of fields #13115 XFA - Add support for few ui elements #13161 Bump y18n from 3.2.1 to 3.2.2 #13156 Prevent errors, in PDFOutlineViewer._getPageNumberToDestHash, for invalid destRef values (PR 12777 follow-up) #13158 Remove the URL polyfill #13157 Remove the file://-URL special-case from webViewerOpenFileViaURL #13166 [api-minor] Support proper URL-objects, in addition to URL-strings, in getDocument #13165 [api-minor] Stop exposing the raw defaultAppearance-string on Annotation-instances #13168 Use post table when Encoding has only Differences #12908 Slightly rescale lineWidth to workaround chrome rendering issue #13169 [api-minor] Change the format of the fontName-property, in defaultAppearanceData, on Annotation-instances (PR 12831 follow-up) #13177 Update packages and translations #13175 [GENERIC viewer] Avoid data loss in forms, by triggering saving when the document is closed (issue 12257) #13179 Utilize Set a bit more in the code-base #13172 [api-minor] Add an option, in PDFDocumentProxy.cleanup, to allow fonts to remain attached to the DOM

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.8.335-dist.zip(4.31 MB)
    pdfjs-2.8.335-legacy-dist.zip(4.83 MB)
  • v2.7.570(Jan 24, 2021)

    This release features improved performance, font rendering, annotation rendering and form rendering/saving/printing (AcroForm). Moreover, it includes initial support for scripting in a sandbox (disabled by default). Finally, support for IE 11 and non-Chromium-based Edge is dropped.

    Changes since v2.6.347:

    #12323 Bump versions in pdfjs.config #12326 Revert "Download, rather than opening, PDF attachments in Firefox (bug 1661259, PR 12286 follow-up)" #12330 Update packages and translations #12329 Rename the --outline-... CSS variables to --treeitem-... instead (PR 11077 follow-up) #12328 Remove code-paths only relevant for IE 11/Edge (non-Chromium based) from the web/ folder #12331 [api-minor] Only support browsers/environments that have basic support for Promise natively #12336 Remove, manually implemented, DOM polyfills only necessary for IE 11 support #12269 Add support for missing appearances for hightlights, strikeout, squiggly and underline annotations. #12339 Support broken /FitH destinations that are missing the "top" value (bug 1663390) #12343 Remove some code/comments relevant for old (pre-Chromium) versions of Opera #12344 Save form data in XFA datasets when pdf is a mix of acroforms and xfa #12345 Don't try to save something for a button which is neither a checkbox nor a radio #12354 Ensure that the container div, on BaseViewer-instances, is absolutely positioned #12352 Remove CSS variables feature-testing from PDFSidebarResizer #12356 Set the modification date to the current day when saving #12349 Follow-up comments on PR #12344 #12357 PDF names need to be escaped when saving #12360 Reset cursor position when focus is out of text field #12362 Let the loadingBar have the same width as the viewerContainer #12364 Dict keys need to be escaped too when saving #12365 Ensure that the length property won't be accidentally accessed on a DecodeStream-instance #12363 canvas: Properly restore all the remaining items in stateStack in endDrawing #12368 Revert "canvas: Properly restore all the remaining items in stateStack in endDrawing" #12372 Skip failing FBF tests, when running makeref, in Firefox as well #12374 Replace \n and \r by \n and \r when saving a string #12370 Implement resetting of created streams for annotations #12361 Ensure that all necessary /Font resources are included when saving a WidgetAnnotation-instance (issue 12294) #12377 Set parent of radio annotation even if there is no 'V' field #12375 Ensure that the empty dictionary won't be accidentally modified, and slightly improve the "SaveDocument" handler in src/core/worker.js #12369 canvas: fix restore() with existing SMask groups and re-land #12363. #12388 Refactor the container/viewer checks in the BaseViewer constructor #12387 Use the same kind of strings for radio values #12393 Prevent errors if the InkList property, in InkAnnotations, is missing and/or not an Array (issue 12392) #12396 Update packages and translations #12397 Update the webpack-stream dependency (issue 11996) #12414 Need to reset the streams when printing #12409 Compute the transformOrigin correctly, for negative values, when rendering AnnotationElements (bug 1627030) #12417 Remove the PDFPageView.{error, stats} properties, and some related viewer clean-up #12405 Fixed keydown event handling problem with shadow DOM. #12423 Update escodegen to version 2.0 #12422 Don't trigger searching, in the GENERIC viewer, when Shift is used together with the regular keyboard shortcut (issue 12421) #12419 Use the cidToGidMap, if it exists, when building the glyph mapping for non-embedded composite fonts (issue 12418) #12426 Re-factor how printing is triggered in the default viewer #12439 Add version/build info at the top of the built web/viewer.js file #12436 Enable the ESLint no-var rule in the src/shared/ folder #12333 Add tooltip if any in annotations layer #12437 Enable the ESLint no-var rule in the src/display/ folder #12441 Re-factor how the ESLint no-var rule is enabled in the src/ folder #12442 Upgrade Puppeteer to version 5.3.1 #12444 Update packages and translations #12445 Upgrade minor/major versions of dependencies that don't require code changes #12446 [Firefox] Stop logging RenderingCancelledExceptions as errors when printing #12448 Enable the ESLint no-debugger and no-alert rules #12450 Fix invalid XUID entries in CFF fonts #12451 Upgrade acorn to version 8 #12454 Upgrade terser to version 5 #12458 Add local caching of TilingPatterns in PartialEvaluator.getOperatorList (issue 2765 and 8473) #12470 Upgrade webpack to version 5 #12476 Remove the scope parameter from the "GetOperatorList" handler in src/core/worker.js (PR 11110 follow-up) #12477 Handle WorkerTasks, and various PDF document properties, correctly in the "SaveDocument" handler in src/core/worker.js #12429 [api-minor] Add the possibility to collect Javascript actions #12479 Fix the "should get form info when AcroForm is present" unit-test #12478 Convert PartialEvaluator.translateFont to an async method #12486 Stop caching the parsed Font data on its Dict object (PR 7347 follow-up) #12483 Don't store complex data in PDFDocument.formInfo, and replace the fields object with a hasFields boolean instead #12481 Get urls if any in AA::D dictionary for pushbuttons #12485 [api-minor] JS - Add a function in api to get the fields ids in AcroForm::CO #12489 Add a test for pdfDocument::fieldObjects #12491 Update packages and translations #12493 Support adding pages, in addition to regular destinations, to the browser history and use it with thumbnails (issue 12440) #12515 Enable the unicorn/no-abusive-eslint-disable ESLint plugin rule #12503 [api-minor] Invalidate an annotation with no quadPoints (when it's required) #12432 JS - Add the basic architecture to be able to execute embedded js #12516 Prevent issues, in PDFDocument.fieldObjects, for invalid Annotations #12526 Improve argument/name handling when parsing TilingPatterns (PR 12458 follow-up) #12524 A couple of small (viewer) tweaks of tooltip-only Annotations (PR 12333 follow-up) #12522 Fix a couple of edge-cases in PDFViewerApplication._initializeJavaScript (PR 12432 follow-up) #12464 Fix getVisibleElements helper in RTL-locales #12508 Fallback font for buttons must be ZapfDingbats. #12528 Convert var to const/let in the test/unit folder #12529 Tweak the pdf.scripting.js bundling, to improve overall consistency #12527 Remove SystemJS usage from the development viewer and the unit-tests #12534 Ensure that MurmurHash3_64.update handles ArrayBuffer input correctly, to avoid hash-collisions (issue 12533) #12532 Modernize, and remove SystemJS usage from, the font-tests #12540 Ensure that the same version of PDF.js is used in both the API and the Viewer (PR 8959 follow-up) #12539 Use standard import statements more when running the unit-tests #12395 Render not displayed annotations in using normal appearance when printing #12542 Add a MurmurHash3_64.update unit-test for TypedArrays which share the same underlying ArrayBuffer (PR 12534 follow-up) #12543 Use a Map, rather than an Object, internally in the Catalog.openAction getter (PR 11644 follow-up) #12551 Fix some errors reported by the ESLint no-useless-escape rule #12525 [api-minor] Implement API to get MarkInfo from the catalog. #12552 Miscellaneous (small) improvements in src/core/annotation.js #12560 Update npm packages #12561 Fix some static analyzer warnings (issue 11965) #12562 Try adding a very basic lgtm.yml file, to prevent LGTM complaining about unused variables (issue 11965) #12555 Replace css color rgb(...) by #... #12559 Also update the browser history when the user manually change pages using the pageNumber-input (PR 12493 follow-up) #12505 [api-minor] Split highlight annotation div into multiple divs #12572 Change the getVisibleElements helper function to take a parameter object #12568 [api-minor] JS -- Add default value in annotation data #12583 Add global caching, for /Resources without blend modes, and use it to reduce repeated fetching/parsing in PartialEvaluator.hasBlendModes #12564 Make sure that Popup is rendered next to trigger for textAnnotation #12530 JS -- Add 'util' object #12591 Improve the Pattern-detection in CanvasGraphics.stroke #12594 Enable the ESLint no-useless-escape rule (PR 12551 follow-up) #12595 Convert files in the src/display/-folder to use optional chaining where possible #12598 Fail early, in modern GENERIC builds, if globalThis isn't available (PR 11799 follow-up, issue 12596) #12546 [api-minor] JS -- Add listener for sandbox events only if there are some actions #12582 JS -- Implement doc object #12585 Fix popup for highlights without popup (follow-up of #12505) #12613 Trigger cleanup, once rendering has finished, in PDFThumbnailView.draw #12616 Improve the cleanup functionality for thumbnails #12618 Ensure that rendering of thumbnails work correctly on HiDPI displays (issue 9820) #12621 Follow-up for #12585: set elements class in render instead of in _createQuadrilaterals #12622 Some hasJSActions, and general annotation-code, related cleanup in the viewer and API #12624 Update packages and translations #12569 JS -- Fix events dispatchment and add tests #12625 Add a new preference, viewerCssTheme, to allow forcing the use of the light/dark viewer CSS themes (issue 12290) #12630 Reduce, now unnecessary, asynchronicity in the BasePreferences constructor #12636 Add an AppOptions.setAll method, and use it in PDFViewerApplication._readPreferences #12567 [api-minor] JS -- hidden annotations must be built in case a script show them #12604 JS -- Add a sandbox based on quickjs #12642 [api-minor] Add "contentLength" to the information returned by the getMetadata method #12645 Convert the PDFDocumentProperties.open method to be async #12647 Update Puppeteer to version 5.5.0 #12656 Bump highlight.js from 9.13.1 to 9.18.5 #12655 Parenthesis in names are not escaped when saving #12662 Check the top-level /Pages dictionary when finding the trailer in XRef.indexObjects (issue 12402) #12652 Add a README about quickjs-eval.js file (build and license) #12665 Update packages and translations #12666 Use the same SVG images, in the default viewer, regardless of the CSS theme #12673 Split underline, strikeout, squiggly annotions div into multiple divs #12631 JS -- Implement app object #12679 Fix the treeitem-expanded/treeitem-collapsed images in dark-mode (PR 12666 follow-up) #12681 Update the link for the "pr8808" test-case (issue 12680) #12682 [Generic viewer] Re-factor how the notFound appearance is set on the "findInput" in the PDFFindBar #12685 Fix issue #12684: replace bitwise ORs by ORs #12693 [Regression] Prevent the built pdf.scripting.js/pdf.sandbox.js files from accidentally including most of the main-thread code (PR 12631 follow-up) #12695 Various clean-up and improvements related to pdf.sandbox.js building, and the related default-viewer functionality #12696 Fix non-standard quadpoints orders for annotations #12634 JS -- Add aform functions #12703 Ensure that the pdf.sandbox.js is removed from the DOM on destroy, and unbreak the Chromium-extension (PR 12695 follow-up) #12707 Checkboxes with the same name must behave like a radio buttons group #12712 Attempt to handle collapsed outline items, in the default viewer, according to the specification (issue 12704, PR 10890 follow-up) #12722 JS -- fix printd issue with negative number #12720 Be sure that CalculationOrder is either null or a non-empty array #12668 Add some integration tests using puppeteer #12723 Bump ini from 1.3.5 to 1.3.7 #12719 JS -- add function eMailValidate used to validate an email address #12717 Ensure that the /Annots-entry, on /Page-instances, is actually an Array (issue 12714) #12728 [gulpfile.js] Move the time-zone hack to the testing-pre task, such that all tests work regardless of the current time-zone #12718 Ignore color-operators in Type3 glyphs beginning with a d1 operator (issue 12705) #12725 Use widths defined by font for standard fonts. #12732 Call done.fail correctly in the scripting_spec.js unit-tests #12734 Update packages and translations #12733 Add a test-case for bug 1292316 #12736 Remove the remaining IE 11 polyfills #12700 Fix automatic zoom under spread mode #12724 Follow-up of #12707: Add an integration test for checkboxes as radio … #12737 Change the minimum "supported" version of the Safari-browser to Safari 10 #12635 JS -- Send events to the sandbox from annotation layer #12742 Don't use 'in' operator to check if key is in a Map #12689 In order to simplify m-c code, move some in pdf.js #12741 JS -- Actions must be evaluated in global scope #12754 Dispatch an event on sandbox creation #12753 Ignore, rather than throwing on, Coding style component (COC) markers in JPEG 2000 images (issue 12752) #12747 Add new "pageopen"/"pageclose" events for usage with JavaScript actions #12702 JS - Collect and execute actions at doc level #12748 Update the events, used with scripting, to use lower-case names and avoid using DOM events internally in the viewer + misc scripting-related tweaks #12758 Run AnnotationStorage.resetModified when destroying the PDFDocumentLoadingTask/PDFDocumentProxy #12760 Switch from Travis CI to GitHub Actions #12761 Stop running gulp components as part of the unit-tests #12751 Add a default DA for textfield to avoid issues when printing or saving #12765 Avoid the getJavaScript API-call in PDFViewerApplication._initializeAutoPrint when "enableScripting" is set #12770 Remove timeout in annotation integration test #12637 JS -- Add support for buttons #12771 [Scripting] Try to ensure that the WillPrint/DidPrint respectively DidSave events are always dispatched #12773 Pass in the "sandboxBundleSrc" option when calling DefaultExternalServices.createScripting #12780 Remove unused .noResults CSS-rule #12781 Update packages and translations #12766 Ignore, rather than throwing on, unsupported Coding style default (COD) options in JPEG 2000 images (issue 11004) #12788 Include the state in the "presentationmodechanged" event, and remove the separate active/switchInProgress properties #12792 Switch the badge in the README from Travis CI to GitHub Actions (PR 12760 follow-up) #12793 Support the once option, when registering EventBus listeners #12796 Extract common functionality into a new BaseTreeViewer._finishRendering method #12800 Convert DefaultExternalServices.fallback to an asynchronous method #12801 Modernize the FirefoxCom.request method #12802 Add a new FirefoxCom.requestAsync method, to simplify the code in web/firefoxcom.js #12805 Remove unnecessary toolbarButton icon-flipping in RTL mode (PR 11077 follow-up) #12804 Remove the DownloadManager.onerror functionality, since its only usage is unlikely to be helpful #12807 Remove unnecessary dir-dependent CSS rules, and add a missing CSS variable (PR 11077 follow-up) #12774 JS -- Add tests for print/save actions #12808 Disable a test using pending function #12825 An option is missing for last versions of worker-loader to use pdf.js with webpack #12815 Update webpack example #12816 JS -- Plug PageOpen and PageClose actions #12292 Fix encoding issues when printing/saving a form with non-ascii characters #12822 Improve the PDFViewerApplication._contentLength handling in the viewer, related mostly to scripting #12824 Improve the handling of errors, in PartialEvaluator.loadFont, occuring in PartialEvaluator.preEvaluateFont (issue 12823) #12820 Don't dispatch "pageclose" events if a "pageopen" wasn't dispatched for the page (PR 12747 follow-up) #12834 Try to fix TypeScript definitions for the es5-build in pdfjs-dist (issue 12872) #12837 Remove unncessary CanvasFactory/CMapReaderFactory/FileReaderFactory duplication in unit-tests #12394 In a text widget, Font resources can be in the appearance #12777 Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050) #12843 Fix broken "issue12394" test-case #12840 Use ESLint to ensure that exports are sorted alphabetically #12842 Improve handling of JPEG images without an EOI marker (issue 12841) #12844 Update packages and translations #12845 Remove unnecessary dir-dependent CSS rules, and simplify som findbar-button rules (PR 11077 follow-up) #12846 Enable the Stylelint length-zero-no-unit rule #12848 Correctly align annotation content in horizontal/spead scrolling modes #12838 [api-minor] Change the "dc:creator" Metadata field to an Array #12853 Fix the initialization/resetting of scripting-related events in the BaseViewer #12855 [api-minor] Highlight search results correctly for normalized text (PR 9448) #12861 Always re-measure non-embedded ArialNarrow fonts (bug 1671312, PR 12725 follow-up) #12812 Enforce line width to be at least 1px after applied transform #12863 Remove a duplicated reference test (PR 12812 follow-up) #12864 Enforce linewidth to 1px when at least one of scale factor is lower than 1 #12874 Put less emphasis on "ES5"/"ES6" in the README and other documentation #12875 Replace some ternary operators with optional chaining, and nullish coalescing, in the src/display/-folder #12871 Only display a notification on the sidebarToggle-button, and not the individual view-buttons (PR 7959 follow-up) #12850 JS -- Add few missing constants in global scope #12878 Remove redundant compatibility checks, for modern generic builds, in src/core/worker.js #12869 Fix zoom issue with too thin lines #12831 Add a parser to get font data from the default appearance #12836 JS -- update radio/checkbox values even if there are no actions #12888 Enable the Stylelint shorthand-property-no-redundant-values rule #12890 Enable ESLint rules that no longer need to be disabled on a directory/file-basis #12886 Use _defaultAppearanceData directly in WidgetAnnotation._getSaveFieldResources (PR 12831 follow-up) #12887 Keep logical assignment operators in MOZCENTRAL/TESTING-builds #12885 Simplify the PDFFunctionFactory._localFunctionCache initialization (PR 12034 follow-up); Fix the gStateObj lookup in TranslatedFont._removeType3ColorOperators (PR 12718 follow-up) #12891 Ensure that parseDefaultAppearance won't attempt to access a not yet defined variable (PR 12831 follow-up) #12828 [api-minor] Set font size and color for text widget annotations #12893 Enable, a basic version of, the ESLint no-use-before-define rule #12870 Add previous/next-page functionality that takes scroll/spread-modes into account (issue 11946) #12899 Update the ESLint env to use "es2021" #12898 Update packages and translations #12897 JS - Fix mouse event names

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.7.570-dist.zip(4.19 MB)
    pdfjs-2.7.570-es5-dist.zip(4.76 MB)
  • v2.6.347(Sep 3, 2020)

    This release features support for form filling (AcroForm) and layers (optional content). Moreover, the default viewer is redesigned to match Firefox's Photon design, TypeScript definitions are shipped and various performance improvements and bugfixes are included.

    Changes since v2.5.207:

    #11948 Bump versions in pdfjs.config and update the getting started page of the website for the new release #11958 [api-minor] Remove the deprecated PDFDocumentProxy.getOpenActionDestination method (PR 11644 follow-up) #11967 Do not transform jpeg RGB components #11964 Fix pdfjs-dist/webpack causing errors with certain configs #11953 For #11838: trigger fallback bar after user clicks in pdf #11972 Change the loadedChunks property, on ChunkedStream instances, from an Array to a Set #11963 Avoid calling Math.pow if possible. #11974 A couple of small image caching/sending improvements #11976 Remove unused methods from NetworkManager, in src/display/network.js #11978 Improve unit test coverage for primitives #11977 Convert the RefSet primitive to a proper class and use a Set internally #11985 Convert some Objects to Maps in ChunkedStreamManager, and move the isEmptyObj helper function to the test utils #11987 Update SVGGraphics to account for globally cached images (PR 11912 follow-up) #11992 Prevent the (old) preprocessor from appending trailing whitespace when removing closing HTML comments #11993 Change the dependencies property, on OperatorList instances, from an Object to a Set #11969 For #11961: collect telemetry on all unique unsupported features that… #11997 Add basic support for the nullish coalescing operator ?? #11999 Update packages and translations #12000 Ensure that PDFImage.buildImage won't accidentally swallow errors, e.g. from ColorSpace parsing (issue 6707, PR 11601 follow-up) #12001 Add local caching of ColorSpaces, by name, in PartialEvaluator.getOperatorList (issue 2504) #12002 Small improvements in CFFCompiler.encodeNumber and CFFCompiler.encodeFloat #12004 Convert the code in src/core/worker.js to use ES6 classes #12005 Convert the code in src/core/cff_parser.js to use ES6 classes #12017 Convert the PDFPageProxy.intentStates property from an Object to a Map #12016 Tweak the QueueOptimizer to recognize OPS.paintImageMaskXObject operators as repeated when the "skew" transformation matrix elements are non-zero (issue 8078) #12021 Move the fetchBuiltInCMap method to the PartialEvaluator.prototype #12012 Improve (local) caching of parsed ColorSpaces (PR 12001 follow-up) #12024 Update Needle to 2.5.0 or greater. #12028 Attempt to detect inline images which contain "EI" sequence in the actual image data (issue 11124) #12032 Update packages and translations #12041 Replace Mozilla Labs by just Mozilla #12049 Enable the no-promise-executor-return ESLint rule #12036 Add at least some test-coverage for the RenderTask.onContinue functionality #12043 Add a reduced test-case for issue 4260 (PR 4521 follow-up) #12044 Adjust the heuristics used when dealing with rectangles, i.e. re operators, with zero width/height (issue 12010) #12040 Replace non-inclusive "whitelist" term with "allowlist" #12039 [api-minor] Use the NodeCanvasFactory/NodeCMapReaderFactory classes as defaults in Node.js environments (issue 11900) #12034 Add local caching of Functions, by reference, in the PDFFunctionFactory (issue 2541) #12057 Allow BaseLocalCache to, optionally, only allocate storage for caching of references (PR 12034 follow-up) #12059 Convert the code in src/core/image.js to use ES6 classes #12060 Convert the code in src/core/evaluator.js to use standard classes #12072 Bump npm from 6.14.5 to 6.14.6 #12056 Refactor/simplify the "delayedFallback" handling in the default viewer #12070 Re-factor the idFactory functionality, used in the core/-code, and move the fontID generation into it #12083 Remove the IR (internal representation) part of the ColorSpace parsing #12063 Tweak the heuristic, in src/core/jpg.js, that handles JPEG images with a wildly incorrect SOF (Start of Frame) scanLines parameter (issue 10989) #12092 Update packages and translations #12090 Stop special-casing the (very unlikely) "no /XObject found"-scenario, when parsing OPS.paintXObject operators, in PartialEvaluator.{getOperatorList, getTextContent} #12099 Use a RefSet, rather than a plain Object, for tracking already processed nodes in PartialEvaluator.hasBlendModes #12085 Make the detection of Node.js environments on Electron strict. #12089 Convert RefSetCache to a proper class and to use a Map internally #12087 Add local caching of "simple" Graphics State (ExtGState) data in PartialEvaluator.{getOperatorList, getTextContent} (issue 2813) #12101 Add a new size getter and getRawValues method, to Dict instances, to simplify some code #12023 Fix auto-rotate for printing landscape PDFs where the first page is also landscape #12114 Remove a couple of unnecessary PDFJSDev checks from the viewer #12106 [api-minor] Add an annotation storage in order to save annotation data in acroforms #12122 Update packages and translations #12124 Include the browser name when printing unit-test results #12126 Attempt to reduce intermittent failures in the "cleans up document resources during rendering of page" unit-test #12125 Improve test bot stability #12127 Improve how Type3-fonts with dependencies are handled #12135 [src/core/worker.js] Remove a useless Promise handler from the pdfManagerReady function #12136 Ignore fetch() errors, in PDFFetchStreamRangeReader, once the request has been aborted #12107 Add support for checkboxes printing #12143 Fix hanging reference test (PR 12107 follow-up) #12141 Populate the find field with the search query when URL has #search hash #12147 [api-minor] Fix the AnnotationStorage usage properly in the viewer/tests (PR 12107 and 12143 follow-up) #12144 Prevent Uncaught (in promise) AbortException when running the unit-tests #12148 Revert "Populate the find field with the search query when URL has #search hash" #12131 [api-minor] Allow loading pdf fonts into another document. #12151 Revert "[api-minor] Allow loading pdf fonts into another document." #12153 Unit test improvements #12108 Add support for radios printing #12102 Add types annotations #12162 Tweak for the type of PageViewportParameters.viewBox (PR 12102 follow-up) #12161 Add types to functions exported as API in src/pdf.js (PR 12102 follow-up) #12157 Fix the type of SVGGraphics (PR 12102 follow-up) #12160 Use typedef to define the type of GlobalWorkerOptions (PR 12102 follow-up) #12095 Add support for optional marked content. #12156 Improve the types generation and API documentation (PR 12102 follow-up) #12163 Re-factor the dispatching of "attachmentsloaded" events, when the PDF document contains no "regular" attachments #12171 Attempt to reduce intermittent failures in the "multiple render() on the same canvas" unit-test #12168 Fix the gulp types task to run on Windows, and place the TypeScript definitions correctly in pdfjs-dist #12172 Fix the type definition of TypedArray. (PR 12156 follow-up) #12174 Do the AppOptions.get("printResolution") lookup once in web/app.js, when initializing PDFPrintServiceFactory-instances, rather than for every printed page #12173 [api-minor] Fix the annotationStorage parameter in PDFPageProxy.render #12179 Add support for Object.fromEntries #12169 Extract common methods from PDFOutlineViewer/PDFAttachmentViewer into a new abstract BaseTreeViewer class #12175 Support textfield and choice widgets for printing #12182 Fix the type of PDFDocumentLoadingTask.destroy. #12154 [api-minor] Allow loading pdf fonts into another document. #12187 Add a test-case for issue 4398 #12188 Update packages and translations #12176 Support multiline textfields for printing #12177 Support comb textfields for printing #12186 Fix bad truetype loca tables. #12192 A couple of (small) tweaks of the AnnotationStorage (PR 12173 follow-up) #12193 Set direction: ltr; on the canvases used during printing (bug 1335712) #12191 Remove the disableCreateObjectURL option from web/app_options.js #12137 Add support for saving forms #12201 Enable renderInteractiveForms by default. #12211 Wait until saving has finished before resetting PDFViewerApplication._saveInProgress (PR 12137 follow-up) #12212 Bug 1643508 - Disable touch-based pinch zooming on pdf.js. #12210 Keep the original class/function names when minifying code (issue 12209) #12203 Bug 1392361 - Fix zooming sensitivity on macOS #12219 Add (basic) support for transfer functions to Images (issue 6931, bug 1149713) #12227 Include image_decoders-es5/minified-es5 in the pdfjs-dist library (issue 12220) #12229 Dispatch event when annotations have finished rendering. #12230 Implement reference testing for printing #12250 Update the zoom dropdown width calculation to work better in locales with long zoom-strings (PR 11077 follow-up) #12251 Return the query with the findcontrolstate #12241 confirm if leaving a modified form without saving #12248 Support file save triggered from the Firefox integrated version. #12247 Improve the field value parsing for choice widgets to handle null values #12256 #12241 followup - move event listener to PDFViewerApplication.load #12244 fix webpack config problem caused by breaking changes of worker-loader #12260 Replace menu dropdown icon #12261 Also enable renderInteractiveForms by default in the viewer components (PR 12201 follow-up) #12265 Don't warn when navigating away from a modified form, if printing has occurred (issue 12262) #12267 Update packages and translations #12263 Fix AcroForm printing/saving edge cases #12268 Reduce the leading padding for the numPages span (PR 11077 follow-up) #12270 Accent positioning in Type1 seac glyphs #12276 Access the XRef/Catalog data correctly in the "GetStats"/"GetPageIndex" handlers in src/core/worker.js #12271 Improve AcroForm/XFA form type detection #12285 Ensure that the sourceEventType parameter is actually optional in PDFViewerApplication.{download, save} (PR 12248 follow-up) #12286 Use a link, rather than window.open, when opening PDF attachments in Firefox (bug 1661259) #12293 Download, rather than opening, PDF attachments in Firefox (bug 1661259, PR 12286 follow-up) #12287 Bug 1661226 - Push button are not rendered with renderInteractiveForms enabled #12298 Tweak the vertical positions of the findbar and secondaryToolbar (PR 11077 follow-up) #12259 Fix handling of symbolic fonts and unicode cmaps. #12300 Fix various :hover effects in the findbar (PR 11077 follow-up) #12299 Update the indeterminate progressBar to the new design (PR 11077 follow-up) #12170 [api-minor] Add support for toggling of Optional Content in the viewer (issue 12096) #12301 Add (basic) support for Stylelint, to allow linting of CSS files #12296 Add support, in Dict.merge, for merging of "sub"-dictionaries #12310 Add support for /Print and /SaveAs named actions in the viewer (issue 12308) #12315 print: Make the firefox printing code able to fail and be re-invoked. #12321 Ensure that the viewer property, on BaseViewer-instances, is a valid div-element (issue 12320)

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.6.347-dist.zip(3.64 MB)
    pdfjs-2.6.347-es5-dist.zip(4.23 MB)
  • v2.5.207(Jun 1, 2020)

    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 #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) #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)

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.5.207-dist.zip(3.62 MB)
    pdfjs-2.5.207-es5-dist.zip(4.19 MB)
  • v2.4.456(Mar 19, 2020)

    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 Errors #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 TypedArrays #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

    Source code(tar.gz)
    Source code(zip)
    pdfjs-2.4.456-dist.zip(3.59 MB)
    pdfjs-2.4.456-es5-dist.zip(4.14 MB)
  • v2.3.200(Oct 3, 2019)

    Changes since v2.2.228:

    #10960 Bump versions in pdfjs.config #10963 Ensure that PDFViewerApplication.{zoomIn, zoomOut} won't run when PesentationMode is active (PR 10652 follow-up) #10959 Remove the data-pdfjsprinting attribute on the <body> when destroying FirefoxPrintService/PDFPrintService instances (issue 10948) #10962 Prevent "Uncaught promise" messages in the console when cancelling TextLayer tasks (PR 10601 follow-up) #10964 Bump lodash from 4.17.10 to 4.17.14 #10958 Remove the intentState.receivingOperatorList boolean since it's redundant #10850 Scale stroking line width when using a tiling pattern. #10851 Apply bounding box before using shading patterns. #10950 Fixed testing webserver to handle paths correctly on Windows #10966 Add timestamp to the page rendered event. #10968 Remove useless wrapReason calls in the MessageHandler class #10970 Simplify, and inline, the finalize function in the MessageHandler class #10969 Add an API unit-test for the stopAtErrors option (PRs 8240 and 8922 follow-up) #10974 Simplify the PDFDocument.fingerprint method slightly #10820 Annotations - Added parsing of IRT, RT, State and StateModel #10987 Bump js-yaml from 3.12.0 to 3.13.1 #10990 Refactor the onBeforeDraw/onAfterDraw functionality used in BaseViewer and PDFPageView #10979 [Firefox] Re-factor the 'zoomreset' message handling in the viewer (PR 10652 follow-up) #10986 Attempt to significantly reduce the number of ChunkedStream.{ensureByte, ensureRange} calls by inlining the this.progressiveDataLength checks at the call-sites #10993 Add the docBaseUrl API parameter to AppOptions in the viewer #10995 Remove an unnecessary PDFDocumentProperties.setFileSize call, relevant for the Firefox built-in viewer, and use the "normal" code-path in PDFViewerApplication.open instead #11001 Inline the isCmd check in the Parser.shift method #10996 Avoid creating a PDFFindBar instance, in the Firefox built-in viewer, when not actually necessary #11003 Ensure that setting the zoomDisabledTimeout isn't skipped, regardless of the supported zoom keys, when handling mouse wheel events (PR 7097 follow-up) #11012 Reduce the number of function calls in EvaluatorPreprocessor.read #11019 Decode URL encoded filenames from content disposition headers #11020 Add a work-around, in glyphlist.js, for bad PDF generators which use a non-standard /f_f string in the Encoding dictionary when referring to the ff ligature (issue 11016) #11033 Ensure that the loading indicator, in the pageNumber input, is hidden when the viewer is closed #11029 [api-minor] Update telemetry to use 'categorical' histograms. #11034 Ensure that ReadableStreams are cancelled with actual Errors #11038 [api-minor] Fix completely broken getStats method by returning stats in Objects, rather than in Arrays (PR 11029 follow-up) #11013 [api-minor] Implement quadpoints for annotations in the core layer #11048 Use more compact keys in PDFLinkService._pagesRefCache #11049 Add page rendered timestamp to telemetry. #11047 Support corrupt PDF files with invalid/non-existent Group /CS entries (issue 11045) #11051 Actually compare the cropBox and mediaBox correctly in the Page.view getter #11057 Handle some corrupt/truncated JPEG images that are missing the EOI (End of Image) marker (issue 11052) #11059 Fallback gracefully when encountering corrupt PDF files with empty /MediaBox and /CropBox entries #11062 Miscellaneous small clean-up of code in the web/ folder #11064 Convert the src/shared/util.js file to ES6 syntax #11070 Inline the isString check in the Parser.getObj method #11073 Move polyfill for codePointAt to String prototype. #11076 Replace the XRef.cache Array with a Map instead #11081 added in information about pdfjs/webpack #11079 [TextLayer] Only cache the current textDiv style when enhanceTextSelection is enabled and use template strings in expandTextDivs #11087 Add a way to disable external links. #11086 [TextLayer] Only cache the originalTransform when enhanceTextSelection is enabled #11091 [TextLayer] Only handle positive padding values in expandTextDivs #11090 [TextLayer] Use an Array to build the total transform, rather than concatenating Strings, in expandTextDivs #11093 Shorthand afterPrint signature in app.js #11092 [TextLayer] Use an Array to build the total padding, rather than concatenating Strings, in expandTextDivs #11069 Use streams for OperatorList chunking (issue 10023) #11096 Update translations/packages and upgrade to eslint version 6 #11095 Include a reduced, non-linked PDF file for the attachments API unit test #11097 [TextLayer] Only measure the width of the text, in _layoutText, for multi-char text divs #11102 Bump mixin-deep from 1.3.1 to 1.3.2 #11104 [TextLayer] Avoid unnecessary font updates in _layoutText and remove setAttribute usage in appendText #11107 Various MessageHandler improvements when using Streams #11110 Remove support for the scope parameter in the MessageHandler.on method #11111 Inline the resolveCall helper function at its call-sites in MessageHandler #11112 Remove the API/Worker version warning message in TESTING mode #11108 Use more ES6 syntax in the annotation code #11115 Ensure that Errors are handled correctly when using postMessage with Streams in MessageHandler #11123 [api-minor] Remove the postMessageTransfers parameter, and thus the ability to manually disable transferring of data, from the API #11118 Transfer, rather than copy, CMap data to the worker-thread #11127 Update the eslint-plugin-mozilla to the latest version (PR 10905 follow-up) #11129 Prevent "offsetParent is not set -- cannot scroll" errors when the viewer loads in e.g. a hidden