This release contains a new pinch to zoom feature for the viewer and other bugfixes and optimizations/cleanups, in particular some that reduce browser reflow and memory usage which improves performance.
Changes since v3.2.146
- Bump versions in
pdfjs.config
by @timvandermeij in #15878 - Avoid an infinite loop when searching for a single diacritic by @calixteman in #15883
- Enable the
defaultZoomDelay
option/preference unconditionally, and other (small) improvements by @Snuffleupagus in #15884 - [api-minor] Remove the
PDFDocumentProxy.stats
getter (PR 15758 follow-up) by @Snuffleupagus in #15880 - Update the
type
/subtype
at the end of font parsing by @Snuffleupagus in #15885 - [api-minor] Add the pinch-to-zoom feature (bug 1677933) by @calixteman in #15886
- Reduce duplication in the
accumulateWheelTicks
/accumulateTouchTicks
methods (PR 15886 follow-up) by @Snuffleupagus in #15891 - [JS] UserActivation must be enabled before running document actions by @calixteman in #15892
- [GV] Remove print stuff because window.print isn't implemented (bug 1808668) by @calixteman in #15894
- [GV] Add an option in the find controller to update matches count only when the last page is reached (bug 1803188). by @calixteman in #15896
- Delay the loading icon display by @calixteman in #15857
- [api-minor] Improve the
useWorkerFetch
default value checks by @Snuffleupagus in #15879 - Inline the
setPDFNetworkStreamFactory
functionality insrc/display/api.js
by @Snuffleupagus in #15887 - Remove shadow around each pages (fix issue #15836) by @calixteman in #15850
- Tweak the
--toolbar-border-color
CSS variable (PR 15850 follow-up) by @Snuffleupagus in #15899 - Set ExpansionFactor to 0.06 when it's equals to 0 in the private dict of CFF fonts by @calixteman in #15900
- Support parsing encrypted documents in
XRef.indexObjects
(issue 15893) by @Snuffleupagus in #15897 - Avoid null ExpansionFactor in type1 fonts (follow-up of #15289) by @calixteman in #15901
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot in #15903
- Remove the
background-color
of the sidebarContent (PR 15850 follow-up) by @Snuffleupagus in #15904 - Upgrade Node.js to version 18 in the CI workflow by @timvandermeij in #15906
- Fix pinch-to-zoom on a macbook trackpad (bug 1809080) by @calixteman in #15907
- Simplify PDFViewerApplication::supportsPrinting (follow-up of #15894) by @calixteman in #15914
- Add support for smooth pinch-to-zoom on a trackpad (bug 1659492) by @calixteman in #15909
- [api-minor] Add a new
transferPdfData
option to allow transferring more data to the worker-thread (bug 1809164) by @Snuffleupagus in #15908 - Improve input validation in
PDFDataTransportStream._onReceiveData
(PR 15908 follow-up) by @Snuffleupagus in #15917 - [api-minor] Enabling transferring of data fetched with the
PDFFetchStream
implementation by @Snuffleupagus in #15916 - Improve unit test coverage of
src/core/core_utils.js
by @timvandermeij in #15905 - Update packages and translations by @Snuffleupagus in #15924
- [Regression] Avoid showing a black canvas during zooming with a
drawingDelay
set (PR 15812 follow-up) by @Snuffleupagus in #15923 - Update
rimraf
to version 4 by @Snuffleupagus in #15925 - Update highlight background when forced colors are active (bug 1759886) by @fchasen in #15921
- [api-minor] Enable transferring of TypedArray PDF data by default (PR 15908 follow-up) by @Snuffleupagus in #15920
- Ensure that Annotation
appearance
-entries are actually Streams by @Snuffleupagus in #15926 - Move --scale-factor variable in the viewer container (fix #15929) by @calixteman in #15930
- Fallback to using the
name
table to infer the encoding for TrueType fonts missing such data (issue 15910) by @Snuffleupagus in #15934 - Update the year in the
license_header
files by @Snuffleupagus in #15940 - Use CSS variables for the textLayer
highlight
colors (PR 15921 follow-up) by @Snuffleupagus in #15937 - Add a
PDFViewerApplication
helper method to center the position after wheel/pinch-zooming by @Snuffleupagus in #15935 - [JBIG2] Ensure that the
decodeInteger
function returns valid integers (issue 15942) by @Snuffleupagus in #15945 - Change 'Current View' to 'Current Page' in the secondary toolbar by @calixteman in #15941
- [GV] Avoid to update the finder when the results aren't complete by @calixteman in #15947
- [api-minor] Deprecate calling
getDocument
directly with aPDFDataRangeTransport
-instance by @Snuffleupagus in #15943 - Move the
disableAutoFetch
functionality into theProgressBar
-class by @Snuffleupagus in #15949 - Tweak
adjustType1ToUnicode
for fonts with a predefined named encoding (bug 1811668, PR 14050 follow-up) by @Snuffleupagus in #15948 - Set up automated l10n review for new English strings by @calixteman in #15952
- Try to avoid to interpret wheel events as pinch-to-zoom ones (bug 1810800) by @calixteman in #15957
- Tweak the
normalizeWheelEventDelta
helper function by @Snuffleupagus in #15959 - Move
ProgressBar
-related CSS variables into theloadingBar
DOM-element (issue 15958) by @Snuffleupagus in #15960 - [JS] Correctly format field with numbers (bug 1811694, bug 1811510) by @calixteman in #15965
- Update packages and translations by @Snuffleupagus in #15971
- Update various README files to be less specific about the supported JavaScript features by @Snuffleupagus in #15963
- Simplify setting the
GlobalWorkerOptions
default values (PR 9480 follow-up) by @Snuffleupagus in #15966 - Tweak the internal handling of the
url
-parameter ingetDocument
(PR 13166 follow-up) by @Snuffleupagus in #15954 - Only accept non-objects passed to
getDocument
in GENERIC builds by @Snuffleupagus in #15964 - Polyfill
Path2D
in Node.js environments by @Snuffleupagus in #15951 - Change the
PDFViewerApplication.open
method to only accept objects by @Snuffleupagus in #15972