v5.4.296
This release contains improvements for annotations, the annotation editor, font conversion, text selection and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20215 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20216
- Add a function changeLightness in order to change the lightness of a RGB color by @calixteman in https://github.com/mozilla/pdf.js/pull/20204
- [Editor] Hide the comment sidebar on document change by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20220
- [Editor] Add editors with a comment in the sidebar by @calixteman in https://github.com/mozilla/pdf.js/pull/20217
- [Editor] Make scrollable the area containing the comments in the sidebar by @calixteman in https://github.com/mozilla/pdf.js/pull/20222
- [Editor] Use the color of the annotation for the background of the comment button by @calixteman in https://github.com/mozilla/pdf.js/pull/20221
- [Editor] Don't save the image when updating a stamp annotation by @calixteman in https://github.com/mozilla/pdf.js/pull/20233
- Add a new function renderRichText to be used in the annotation layer by @calixteman in https://github.com/mozilla/pdf.js/pull/20231
- Fix the rendering of XFA rich text in popup annotations by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20238
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in https://github.com/mozilla/pdf.js/pull/20242
- Bump actions/setup-node from 4 to 5 by @dependabot[bot] in https://github.com/mozilla/pdf.js/pull/20243
- Improve the integration test code by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20172
- [Editor] Fix saving a deleted popup by @calixteman in https://github.com/mozilla/pdf.js/pull/20244
- [Editor] Add the dates and rich text if any to the editors in order to use them when displaying the popup by @calixteman in https://github.com/mozilla/pdf.js/pull/20245
- Unskip the
must check that date entered by the user is consistent
scripting integration test for Firefox by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20239 - [Editor] Make sure the comment button is at the right place when adding it in the toolbar by @calixteman in https://github.com/mozilla/pdf.js/pull/20248
- [Editor] When clicking on a comment in the sidebar, wait for the annotation editor layer to be rendered by @calixteman in https://github.com/mozilla/pdf.js/pull/20247
- Reduce background canvas resolution by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/20255
- Add an option in scrollIntoView and goToXY in order to be able to center vertically or horizontally the point XY in the viewer container by @calixteman in https://github.com/mozilla/pdf.js/pull/20253
- [Editor] Don't throw when switching to editing mode before an annotation editor layer is rendered by @calixteman in https://github.com/mozilla/pdf.js/pull/20259
- [Editor] Cleanup the pages not being fully rendered before switching to editing mode by @calixteman in https://github.com/mozilla/pdf.js/pull/20258
- Make sure that a good constrast ratio is respected when darkening/lightening a color by @calixteman in https://github.com/mozilla/pdf.js/pull/20240
- Store ops bboxes in a linear Uint8Array by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/20208
- Fix JSDoc description in src/display/api.js by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/20267
- Only record bboxes when needed by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/20256
- Use a dichotomy to find a color with a good contrast ratio by @calixteman in https://github.com/mozilla/pdf.js/pull/20269
- Replace manual returns with
pending
in the integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20271 - Consider a ttf font with both Symbolic and Nonsymbolic flags set with a Differences array in the encoding dict as non-symbolic by @calixteman in https://github.com/mozilla/pdf.js/pull/20270
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20272
- [Editor] Add a new popup for comments (bug 1987425) by @calixteman in https://github.com/mozilla/pdf.js/pull/20249
- [Annotation] Use the new popup in reading mode (bug 1987426) by @calixteman in https://github.com/mozilla/pdf.js/pull/20250
- [Editor] Fix the position of the comment popup and its dialog by @calixteman in https://github.com/mozilla/pdf.js/pull/20278
- [Annotation] Save the comment changes made in reading mode (bug 1987427) by @calixteman in https://github.com/mozilla/pdf.js/pull/20274
- Avoid unused css variables by @calixteman in https://github.com/mozilla/pdf.js/pull/20279
- Use
console.warn
/console.info
where appropriate by @sigmaSd in https://github.com/mozilla/pdf.js/pull/20252 - [Editor] Fix the focus outline for the comment dialog buttons by @calixteman in https://github.com/mozilla/pdf.js/pull/20281
- [Editor] Make sure to not add extra editors when showing again a destroyed page by @calixteman in https://github.com/mozilla/pdf.js/pull/20282
- Update OpenJPEG to 2.5.4 by @calixteman in https://github.com/mozilla/pdf.js/pull/20286
- Serialize font data into an ArrayBuffer by @ryzokuken in https://github.com/mozilla/pdf.js/pull/20197
- [Editor] Make sure the comment dialog is visible on the screen (bug 1989304) by @calixteman in https://github.com/mozilla/pdf.js/pull/20283
- [Editor] Remove useless computations when setting the dimensions of an editor by @calixteman in https://github.com/mozilla/pdf.js/pull/20285
- [Editor] When in HCM, don't apply light/dark color in the comment buttons (bug 1977269) by @calixteman in https://github.com/mozilla/pdf.js/pull/20291
- [Editor] Update the color and the position of the comment button in reading mode they've been modified by @calixteman in https://github.com/mozilla/pdf.js/pull/20295
- [Editor] Don't add scrollbars when it's useless in the comment sidebar (bug 1990099) by @calixteman in https://github.com/mozilla/pdf.js/pull/20297
- [Editor] Avoid to use similar colors for background and foreground colors in HCM (bug 1990082) by @calixteman in https://github.com/mozilla/pdf.js/pull/20298
- [Editor] Use some percent coordinates for the comment dialog (bug 1990104) by @calixteman in https://github.com/mozilla/pdf.js/pull/20299
- [Editor] Fix the button labels in the comment dialog (bug 1990499) by @calixteman in https://github.com/mozilla/pdf.js/pull/20300
- [Editor] Make the comment sidebar resizable (bug 1990544) by @calixteman in https://github.com/mozilla/pdf.js/pull/20303
- [Editor] Add a title to the comment buttons (bug 1990813) by @calixteman in https://github.com/mozilla/pdf.js/pull/20305
- [Editor] Move the focus to the comment button once editing is done (bug 1990820) by @calixteman in https://github.com/mozilla/pdf.js/pull/20304
- [Editor] Make sure the selected editor is correctly focused after switching editing mode (bug 1990872) by @calixteman in https://github.com/mozilla/pdf.js/pull/20307
- [Editor] Fix the URL for the 'Learn more' link in the comment sidebar (bug 1990454) by @calixteman in https://github.com/mozilla/pdf.js/pull/20308
- [Editor] Show the comments in the sidebar in the chronological order,newest to oldest (bug 1990762) by @calixteman in https://github.com/mozilla/pdf.js/pull/20310
- Update dependencies by @calixteman in https://github.com/mozilla/pdf.js/pull/20309
- [Editor] Give the focus to the comment button after editing in reading mode by @calixteman in https://github.com/mozilla/pdf.js/pull/20311
- [Annotation] In reading mode with new commment stuff enabled, use the comment popup for annotations without a popup but with some contents (bug 1991029) by @calixteman in https://github.com/mozilla/pdf.js/pull/20312
- [Editor] Add some telemetry for the commenting feature (bug 1991172) by @calixteman in https://github.com/mozilla/pdf.js/pull/20313
- [Editor] Remove useless sidebar css by @calixteman in https://github.com/mozilla/pdf.js/pull/20314
- [Editor] Add a fake annotation (in the annotation layer) associated with an editor in order to be able to show the comment button (bug 1989420) by @calixteman in https://github.com/mozilla/pdf.js/pull/20321
- [Editor] Avoid an error when getting the editors telemetry data by @calixteman in https://github.com/mozilla/pdf.js/pull/20318
- [Annotation] Fix some timezone issues when getting a date from the date picker (bug 1991584) by @calixteman in https://github.com/mozilla/pdf.js/pull/20320
- [Editor] Add the possibility to unselect a comment from the sidebar by @calixteman in https://github.com/mozilla/pdf.js/pull/20322
- Increase the rendering quality of the detail view (bug 1991482) by @calixteman in https://github.com/mozilla/pdf.js/pull/20323
- Improve serif fallback font name matching by @james-atticus in https://github.com/mozilla/pdf.js/pull/20224
- Fix the creation of the annotation layer in the ref tests by @calixteman in https://github.com/mozilla/pdf.js/pull/20329
- [Editor] Make sure the comment dialog always have relative coordinates between 0% and 100% by @calixteman in https://github.com/mozilla/pdf.js/pull/20328
- [Editor] Slightly move the resizer in the sidebar comment in order to make it easier to use (bug 1992385) by @calixteman in https://github.com/mozilla/pdf.js/pull/20332
- Only apply word spacing when there is a 0x20 in the text chunk by @calixteman in https://github.com/mozilla/pdf.js/pull/20334
- Bump tar-fs from 3.1.0 to 3.1.1 by @dependabot[bot] in https://github.com/mozilla/pdf.js/pull/20301
- Fix incremental saving with hybrid references by @calixteman in https://github.com/mozilla/pdf.js/pull/20333
v5.4.149
This release contains improvements for the annotation editor, performance, printing and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20124 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20125
- [Editor] Add a floating button in order to highlight the text selection and add a comment (bug 1979381) by @calixteman in https://github.com/mozilla/pdf.js/pull/20119
- Add regression test for PR 19639 by @maettuu in https://github.com/mozilla/pdf.js/pull/20109
- Add comment-* images when building components by @calixteman in https://github.com/mozilla/pdf.js/pull/20128
- [Editor] Remove useless css and use a defined but unused property by @calixteman in https://github.com/mozilla/pdf.js/pull/20131
- [Editor] Remove unused property by @calixteman in https://github.com/mozilla/pdf.js/pull/20132
- Fix intermittent failure in the "must check that the computed value is correct" scripting integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20134
- Disable printing when enablePermission is true and the pdf isn't allowed to be printed (bug 1978985) by @calixteman in https://github.com/mozilla/pdf.js/pull/20129
- [Editor] Highlight text on a selectionchange event which hasn't been triggered by the pointer or the keyboard (bug 1976597) by @calixteman in https://github.com/mozilla/pdf.js/pull/20138
- Trigger a fake scrollend event in case it hasn't been triggered by the browser (bug 1957680) by @calixteman in https://github.com/mozilla/pdf.js/pull/20142
- Lazy initialize FinalizationRegistry used by IccColorSpace.#finalizer by @fnlctrl in https://github.com/mozilla/pdf.js/pull/20148
- Make horizontal padding relative to device width by @Aditi-1400 in https://github.com/mozilla/pdf.js/pull/20093
- Mark
canvasContext
as optional by @k-nut in https://github.com/mozilla/pdf.js/pull/20149 - Update l10n files by @calixteman in https://github.com/mozilla/pdf.js/pull/20159
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/mozilla/pdf.js/pull/20161
- Check the setDash arguments by @calixteman in https://github.com/mozilla/pdf.js/pull/20160
- [Editor] Avoid to use a null signal when setting listeners in the editor toolbar by @calixteman in https://github.com/mozilla/pdf.js/pull/20166
- [Editor] Correctly hide deleted annotations by @calixteman in https://github.com/mozilla/pdf.js/pull/20164
- Implement a delay for Chrome protocol calls in the integration tests, and skip the "must check that an existing highlight is ignored on hovering" integration test on Windows by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20126
- Update Firefox preferences for testing by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20171
- [Editor] Add the ability to get all the editable annotations in a pdf document by @calixteman in https://github.com/mozilla/pdf.js/pull/20167
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20169
- Use Firefox stable for the tests because bug 1983414 by @calixteman in https://github.com/mozilla/pdf.js/pull/20178
- Add logic to track rendering area of various PDF ops by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19043
- Use Firefox nightly with puppeteer by @calixteman in https://github.com/mozilla/pdf.js/pull/20186
- [Editor] Make sure the resizers are on top of the editor content by @calixteman in https://github.com/mozilla/pdf.js/pull/20183
- Use the cached annotations when collecting them by types by @calixteman in https://github.com/mozilla/pdf.js/pull/20184
- [Editor] Move the comment button just before the delete one by @calixteman in https://github.com/mozilla/pdf.js/pull/20180
- [Editor] Add a Rect entry to a saved popup in order to avoid to have an invalid pdf by @calixteman in https://github.com/mozilla/pdf.js/pull/20179
- Use WebDriver BiDi for Chrome by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20188
- [Editor] Don't use a null signal for the comment button by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20189
- Update puppeteer to 24.17.0 by @calixteman in https://github.com/mozilla/pdf.js/pull/20187
- [Editor] Add a button to the annotation having a popup in order to edit it by @calixteman in https://github.com/mozilla/pdf.js/pull/20182
- Don't iterate over all empty slots in the xref entries (bug 1980958) by @calixteman in https://github.com/mozilla/pdf.js/pull/20170
- Improve the selection check in the "doesn't jump when moving selection" integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20190
- [Editor] Change the icon for inline comments by @calixteman in https://github.com/mozilla/pdf.js/pull/20194
- Add a method goToXY in PDFLinkService in order to scroll the document at a given location by @calixteman in https://github.com/mozilla/pdf.js/pull/20191
- Skip the curvature ink editor integration test for Chrome on Windows by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20195
- [Editor] Add a method to get an editor rect in the pdf page coordinates by @calixteman in https://github.com/mozilla/pdf.js/pull/20196
- [Editor] Remove useless CSS and fix styling for the comment button by @calixteman in https://github.com/mozilla/pdf.js/pull/20200
- [Editor] Fix the dimensions of the comment icon by @calixteman in https://github.com/mozilla/pdf.js/pull/20209
- [Editor] Fix unit (for consistency) and remove few useless px by @calixteman in https://github.com/mozilla/pdf.js/pull/20211
- Reset editing mode when changing the pdf document by @calixteman in https://github.com/mozilla/pdf.js/pull/20212
- [Editor] Add a sidebar allowing the user to navigate between the comments in a pdf (bug 1985567) by @calixteman in https://github.com/mozilla/pdf.js/pull/20210
v5.4.54
This release contains improvements for accessibility, annotations, the annotation editor, font conversion and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20061 - Use the creation date in the popup when there is no modification date by @calixteman in https://github.com/mozilla/pdf.js/pull/20058
- Fix typos across the codebase by @noritaka1166 in https://github.com/mozilla/pdf.js/pull/20060
- Fix the default appearance of a Polygon annotation when a fill color is provided by @calixteman in https://github.com/mozilla/pdf.js/pull/20063
- Add few methods to the Dict class in order to simplify the code when writing an annotation by @calixteman in https://github.com/mozilla/pdf.js/pull/20064
- [api-minor] Move getContext call to InternalRenderTask by @ryzokuken in https://github.com/mozilla/pdf.js/pull/20016
- Bump library version to
5.4
by @ryzokuken in https://github.com/mozilla/pdf.js/pull/20071 - Revert "Make horizontal padding relative to device width" by @calixteman in https://github.com/mozilla/pdf.js/pull/20076
- Use the canvas context from mozPrintCallback when printing a pdf from the Firefox viewer by @calixteman in https://github.com/mozilla/pdf.js/pull/20082
- In HCM, invert colors when hovering an annotation with a popup by @calixteman in https://github.com/mozilla/pdf.js/pull/20084
- Add the l10n parameter when pasting a Signature annotation by @calixteman in https://github.com/mozilla/pdf.js/pull/20081
- [Editor] Remove a popup from the DOM when it's deleted by @calixteman in https://github.com/mozilla/pdf.js/pull/20077
- [Editor] Add the possibility to add a popup to an annotation when saving by @calixteman in https://github.com/mozilla/pdf.js/pull/19976
- Fix the "must check that canvas perfectly fits the page whatever the zoom level" viewer integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20087
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20086
- Handle the case where all the image data are in the alpha channel (bug 1975719) by @calixteman in https://github.com/mozilla/pdf.js/pull/20085
- [Editor] Add a color picker in the toolbar of Ink and Freetext annotations by @calixteman in https://github.com/mozilla/pdf.js/pull/20070
- Avoid Firefox test failure by @calixteman in https://github.com/mozilla/pdf.js/pull/20092
- [Editor] Use a round color swatch for the basic color picker by @calixteman in https://github.com/mozilla/pdf.js/pull/20094
- [Editor] Make sure that doorhangers are large enough to fit localized strings by @calixteman in https://github.com/mozilla/pdf.js/pull/20095
- Don't add an undefined id to the span for marked content by @calixteman in https://github.com/mozilla/pdf.js/pull/20103
- [Editor] Make possible to change the highlight color from the main panel by @calixteman in https://github.com/mozilla/pdf.js/pull/20098
- [Editor] Add the possibility to add Popup annotations (bug 1976724) by @calixteman in https://github.com/mozilla/pdf.js/pull/20080
- [Editor] Only add a popup to an existing annotation if it exits by @calixteman in https://github.com/mozilla/pdf.js/pull/20104
- Use canvas context text primitives when the font file is missing by @calixteman in https://github.com/mozilla/pdf.js/pull/20101
- Make the link annotations correctly announced by screen readers (bug 1708041) by @calixteman in https://github.com/mozilla/pdf.js/pull/20096
- Fix intermittent failure in the viewer alert tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20106
- [Editor] Fix the highlighting colors in HCM (bug 1977259) by @calixteman in https://github.com/mozilla/pdf.js/pull/20099
- Update translations and dependencies to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20107
- Fix the xref table with the values we've at the beginning of a xref stream (bug 1978317) by @calixteman in https://github.com/mozilla/pdf.js/pull/20113
- Use a HTML date/time input when a field requires a date or a time. by @calixteman in https://github.com/mozilla/pdf.js/pull/20116
- [Editor] Don't show the actions button in the comment popup when it's useless by @calixteman in https://github.com/mozilla/pdf.js/pull/20120
v5.3.93
This release contains improvements for accessibility, annotations, the annotation editor, forms, printing and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19981 - Update Puppeteer to version 24.10.0 by @calixteman in https://github.com/mozilla/pdf.js/pull/19985
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19997
- Fix intermittent failure in the find integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20000
- Log test number and id in reftests by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/20002
- Move the popup annotation in the DOM just after the element triggering it by @calixteman in https://github.com/mozilla/pdf.js/pull/20004
- [Editor] Fix the text alignment in freetext annotations (bug 1971134) by @calixteman in https://github.com/mozilla/pdf.js/pull/20011
- Fix a printing issue on Mac (bug 1961423) by @calixteman in https://github.com/mozilla/pdf.js/pull/19996
- Remove the possibility to go to the next page in using the ENTER key (bug 1971299) by @calixteman in https://github.com/mozilla/pdf.js/pull/20003
- Make annotations focusable just after the text layer by @calixteman in https://github.com/mozilla/pdf.js/pull/20013
- [JS] Make the date parser less strict by @calixteman in https://github.com/mozilla/pdf.js/pull/20021
- Correctly handle files with a hash sign in their names (bug 1894166) by @calixteman in https://github.com/mozilla/pdf.js/pull/19992
- Only show popups when they've some contents to display by @calixteman in https://github.com/mozilla/pdf.js/pull/19986
- Slightly simplify the way to create the editor toolbar by @calixteman in https://github.com/mozilla/pdf.js/pull/19993
- Allow to have an URL as file parameter when loading the viewer by @calixteman in https://github.com/mozilla/pdf.js/pull/20027
- [Editor] When editing mode is disabled, allow to double click on a added annotation to edit it by @calixteman in https://github.com/mozilla/pdf.js/pull/20023
- [Editor] Fix the accessibility of the dropdown in the color picker by @calixteman in https://github.com/mozilla/pdf.js/pull/20022
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/20028
- Get the text under highlight/squiggly/underline/strikethrough annotations (bug 1885505) by @calixteman in https://github.com/mozilla/pdf.js/pull/20019
- Add some telemetry in order to know what are the certificates used in pdfs (bug 1973573) by @calixteman in https://github.com/mozilla/pdf.js/pull/20031
- Don't remove a dash at the end of a line when guessing urls (bug 1974112) by @calixteman in https://github.com/mozilla/pdf.js/pull/20038
- [Editor] In the signature modal, disable the save checkbox when the storage is full (bug 1974257) by @calixteman in https://github.com/mozilla/pdf.js/pull/20039
- Remove the shadow from the links (bug 1974436) by @calixteman in https://github.com/mozilla/pdf.js/pull/20041
- Make horizontal padding relative to device width by @Aditi-1400 in https://github.com/mozilla/pdf.js/pull/20047
- Don't focus the viewer at startup (bug 1974863) by @calixteman in https://github.com/mozilla/pdf.js/pull/20054
- [Editor] When an annotation is added, announce it if the user is using a screen reader (bug 1975264) by @calixteman in https://github.com/mozilla/pdf.js/pull/20055
- Make Popup annotations always have noRotate flag set as true by @yyliu12 in https://github.com/mozilla/pdf.js/pull/20043
- [Editor] Allow to change the editor mode when selecting the corresponding editor (bug 1975538) by @calixteman in https://github.com/mozilla/pdf.js/pull/20056
v5.3.31
This release contains improvements for annotations, the annotation editor, font conversion, image decoding, performance and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19875 - Add useractivation check for response function by @1Jesper1 in https://github.com/mozilla/pdf.js/pull/19855
- Add a basic
navigator
polyfill for older Node.js versions by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19876 - Fix the bbox when saving a rotated text field (bug 1963407) by @calixteman in https://github.com/mozilla/pdf.js/pull/19881
- Assert that
numberToString
is called with a number (issue 19877) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19880 - Don't update the visible canvas at 60 fps (bug 1936605) by @calixteman in https://github.com/mozilla/pdf.js/pull/19856
- Allow to, optionally, keep Unicode escape sequences in
stringToPDFString
(PR 17331 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19884 - Fix arguments in
toStyle
call inCheckButton
by @gpanakkal in https://github.com/mozilla/pdf.js/pull/19883 - Remove the
BasePdfManager.prototype.catalog
getter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19888 - Simplify the
serializeXfaData
method and related code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19887 - Simplify the
loadXfaImages
method and related code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19885 - Slightly re-factor how we pre-load fonts and images in XFA documents by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19889
- Downscale jpeg2000 images, if needed, while decoding them by @calixteman in https://github.com/mozilla/pdf.js/pull/19893
- Unify method return values in the
ObjectLoader
class, and simplify how theObjectLoader
is used by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19895 - Update the Firefox repository used in
external/importL10n/locales.mjs
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19905 - Add a pref in order to cap the canvas area to a factor of the window one (bug 1958015) by @calixteman in https://github.com/mozilla/pdf.js/pull/19755
- Shorten the code in the
src/core/document.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19902 - Shorten the
PDFDocument.prototype.fieldObjects
getter slightly by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19903 - Improve validation in the
Catalog.prototype.openAction
getter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19913 - Decode appearance keys of checkboxes by @calixteman in https://github.com/mozilla/pdf.js/pull/19911
- Reduce duplication when computing the maximum canvas pixels by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19915
- Preserve webpack/vite ignore comments when minifying by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19922
- Update qcms build by @calixteman in https://github.com/mozilla/pdf.js/pull/19924
- [Editor] Keep aspect ratio when rescaling an image before being processed for a signature (bug 1962819) by @calixteman in https://github.com/mozilla/pdf.js/pull/19925
- Run CI tests in Node.js version 24 by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19897
- Remove unused OpenJPEG wasm fallback logic by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19923
- Prefer the /Metadata, when available, in the document properties dialog (bug 1966086) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19929
- Minify the js code when building for Firefox (bug 1965003) by @calixteman in https://github.com/mozilla/pdf.js/pull/19934
- Allow using the
workerPort
option in Firefox by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19936 - Use the worker created in the child actor (bug 1966721) by @calixteman in https://github.com/mozilla/pdf.js/pull/19935
- Bump undici from 6.21.1 to 6.21.3 by @dependabot in https://github.com/mozilla/pdf.js/pull/19933
- Enable the
unicorn/prefer-import-meta-properties
ESLint plugin rule by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19916 - chore: remove redundant word in comment by @studystill in https://github.com/mozilla/pdf.js/pull/19937
- Add a couple of new
eslint-plugin-unicorn
rules by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19917 - Replace
PDFWorker.fromPort
with a genericPDFWorker.create
method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19943 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19942
- Ensure that the viewer clears the
workerPort
option when using "fake" workers by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19939 - Use private fields in the
PDFDataRangeTransport
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19944 - Remove Node.js-specific checks when using the Fetch API by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19945
- Fix intermittent failure in the stamp editor's undo-related integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19949
- Fix missing
await
for asynchronous method calls in the integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19950 - [api-minor] Create the css color to use with the canvas in the worker by @calixteman in https://github.com/mozilla/pdf.js/pull/19953
- Support Type3 fonts with an incomplete /FontDescriptor dictionary (issue 19954) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19955
- Fix pdfjsPreloadedWorker when it's undefined by @calixteman in https://github.com/mozilla/pdf.js/pull/19959
- Remove all the useless subarrays when using qcms. by @calixteman in https://github.com/mozilla/pdf.js/pull/19957
- Bump library version to
5.3
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19960 - Don't create a useless subarray when getting image data from a flate stream by @calixteman in https://github.com/mozilla/pdf.js/pull/19958
- Revert "Minify the js code when building for Firefox (bug 1965003)" by @calixteman in https://github.com/mozilla/pdf.js/pull/19967
- Improve how the PDF.js version/commit information is exposed in the built files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19956
- Show the op dispatched by constructPath in the debugger by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19961
- Ignore empty paths when optimizing
constructPath
operations (issue 19971) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19972 - Replace semi-private fields/methods with actual private ones in
src/core/catalog.js
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19964 - Move a few helper functions/classes out of the
src/display/api.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19962 - Fix the colors of disabled buttons in the dialogs by @calixteman in https://github.com/mozilla/pdf.js/pull/19975
- [Editor] Change mode when double clicking on an editor by @calixteman in https://github.com/mozilla/pdf.js/pull/19969
- Fix intermittent failure in the "supports specifying a custom origin" viewer integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19952
v5.2.133
This release contains improvements for the annotation editor, font conversion, performance, text selection and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19741 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19742
- Isolate the "basic operations" freetext editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19743
- Simplify singularValueDecompose2dScale in order to make it using less memory by @calixteman in https://github.com/mozilla/pdf.js/pull/19721
- Optimize save-transform-constructPath-restore by @calixteman in https://github.com/mozilla/pdf.js/pull/19712
- Reduce some code duplication when handling globally cached images by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19746
- [api-minor] Move Type3-glyph compilation to the worker-thread by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19736
- Remove few useless beginPaths by @calixteman in https://github.com/mozilla/pdf.js/pull/19732
- Change
Util.applyTransform
to use the point-argument as an in/out parameter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19751 - Simplify updateRectMinMax in order to use slightly less memory by @calixteman in https://github.com/mozilla/pdf.js/pull/19752
- Also transfer
ImageBitmap
s for image masks and inline images by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19760 - Bump library version to
5.2
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19766 - Attempt to get bundlers to leave Emscripten Compiler generated
URL
s alone (issue 19761) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19767 - Pass the /Info-strings as a
Map
to thesrc/core/writer.js
code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19768 - Replace UpdateRectMinMax by getAxialAlignedBoundingBox by @calixteman in https://github.com/mozilla/pdf.js/pull/19763
- Use
ctx.filter
unconditionally in thesrc/display/canvas.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19756 - Initialize the
isOffscreenCanvasSupported
option, in theOperatorList
class, once per document by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19758 - Change how (most) fields are initialized in the
CanvasExtraState
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19771 - Avoid to create an array when setting the text matrix by @calixteman in https://github.com/mozilla/pdf.js/pull/19772
- Remove
Array.prototype.reduce
usage from the unit-tests by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19776 - Tweak the Node.js version listed in "engines", to ensure that
process.getBuiltinModule
is available by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19777 - Use Array-destructuring when computing MIN/MAX in
AFSimple_Calculate
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19775 - Lint against
export [some declaration]
by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19786 - [chrome] Fix text selection with
.markedContent
by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19785 - Enable the
no-array-reduce
ESLint plugin rule by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19788 - Move the
IDENTITY_MATRIX
constant intosrc/core/core_utils.js
(PR 19772 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19781 - Inline
PDFImage.createRawMask
in thePDFImage.createMask
method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19773 - [api-minor] Replace various
getAll
methods with iterators by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19778 - Handle non-integer and out-of-range values correctly in Indexed color spaces by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19791
- [Editor] Fix the border line of the thickness slider in the signature modal while in HCM (bug 1959774) by @calixteman in https://github.com/mozilla/pdf.js/pull/19799
- [Editor] Commit the current drawing before switching the current mode by @calixteman in https://github.com/mozilla/pdf.js/pull/19797
- Use
adjustWidths
unconditionally for all embedded fonts (issue 19802) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19804 - Catch circular references in /Form XObjects (issue 19800) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19803
- Simplify the
getAnnotationStorage
integration-test helper function by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19790 - Simplify
Object.fromEntries
usage a tiny bit in theweb/generic_signature_storage.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19789 - Change
PDFDocument.prototype._xfaStreams
to return aMap
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19805 - Add more logical assignment in the
src/
folder by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19806 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19807
- Run the integration tests in a random order by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19809
- Update Webpack to version
5.99.5
(issue 19808) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19810 - Remove debug code from the integration tests, and skip the "must check that canvas perfectly fits the page whatever the zoom level" integration test in Chrome by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19812
- Improve error handling when parsing page-structTrees by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19824
- Avoid to create any subarrays when optimizing 'save, transform, constructPath, restore' (bug 1961107) by @calixteman in https://github.com/mozilla/pdf.js/pull/19825
- Check that the
Object.prototype
hasn't been incorrectly extended (PR 11582 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19828 - Replace the info icon in the undo bar by the right one (bug 1960523) by @calixteman in https://github.com/mozilla/pdf.js/pull/19829
- Fix printing of XFA documents, by calling
XfaLayerBuilder.prototype.render
correctly (issue 19840) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19841 - Always fallback to checking all destinations, when lookup fails (issue 19835) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19836
- Remove duplicate secondaryToolbar button
mask-image
definitions (PR 18385 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19823 - Add a "supportsPrinting" viewer-option (bug 1957401) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19816
- Disable userActivation before executing a setTimeout/setInterval callback by @calixteman in https://github.com/mozilla/pdf.js/pull/19853
- Use the
light-dark
CSS function in the viewer (issue 17780) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19819 - Ensure that the /Form XObject /Resources-entry is actually a dictionary (issue 19848) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19849
- Fix errors when running the integration tests by @calixteman in https://github.com/mozilla/pdf.js/pull/19854
- Fix the debugger CSS when using the dark theme (PR 19819 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19861
- Ensure that "local" /Contents stream-dict /Resources aren't empty (PR 19803 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19815
- Fix 'print to pdf' on Mac with a cid font (bug 1961423) by @calixteman in https://github.com/mozilla/pdf.js/pull/19862
- Fix beginner bugs link in README by @loganrosen in https://github.com/mozilla/pdf.js/pull/19814
- Tweak the Node.js version listed in "engines", to ensure that process.getBuiltinModule is available by @luckymore in https://github.com/mozilla/pdf.js/pull/19858
- Use the
MathClamp
helper function more in theweb/
folder (PR 19617 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19868 - Avoid (most) string parsing when removing/replacing the hash property of a URL by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19866
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19869
- Always render the Annotation- and XFA-layers with light
color-scheme
(issue 19871) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19874 - Fix the "must work properly when selecting undo by keyboard" integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19873
v5.1.91
This release contains improvements for the annotation editor, font conversion, performance, SMask rendering and the viewer, as well as bugfixes and improvements after feedback on the initial PDF.js 5.0 release.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19663 - Replace a few simple regular expressions in the XFA-code with string parsing by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19662
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19665
- [api-minor] Attempt to support fetching the raw data of the PDF document from the
PDFDocumentLoadingTask
-instance (issue 15085) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19632 - Bump library version to
5.1
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19667 - Don't get ICC color space files if required API options are missing by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19669
- Fix the "Signature Editor Basic operations must check copy and paste" integration test by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19671
- Remove documentation for unused l10n variable (PR 18492 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19673
- For JPEG images with CMYK-data, ensure that the alpha-component is set correctly when WebAssembly is disabled (issue 19676) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19677
- Introduce a
fetchSync
helper function for theIccColorSpace
classes by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19675 - Introduce more
async
code in thesrc/core/document.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19674 - Improve
addSignatureDescription
/editSignatureDescription
handling (issue 19683) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19684 - [Editor] Take into account the parent rotation when switch to edit mode (issue #19424) by @calixteman in https://github.com/mozilla/pdf.js/pull/19685
- Fix the MD5 computation in the
src/core/writer.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19693 - Improve the implementation in
src/core/writer.js
a little bit by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19692 - Replace the
setValues
function withArray.prototype.fill()
in thesrc/core/bidi.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19703 - [api-minor] Add a basic
AbortSignal.any
polyfill in PDF.jslegacy
builds by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19681 - Extend
getSupplementalGlyphMapForCalibri
with Pound-sign (issue 19695) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19696 - Isolate the scripting integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19705
- [api-minor] Use a Path2D when doing a path operation in the canvas (bug 1946953) by @calixteman in https://github.com/mozilla/pdf.js/pull/19689
- Isolate the "move editor with arrows" freetext editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19706
- Introduce
Math.sumPrecise
usage in the code-base by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19710 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19704
- Fix save/restore while in smask mode by @calixteman in https://github.com/mozilla/pdf.js/pull/19708
- Isolate the "create editor with keyboard" freetext editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19711
- Take into account the path and the line width when consuming a stroked path by @calixteman in https://github.com/mozilla/pdf.js/pull/19715
- Use the
MathClamp
helper function even more (PR 19617 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19714 - Add new bounding-box helpers in
Util
to reduce code duplication by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19713 - Take into account the group bbox by @calixteman in https://github.com/mozilla/pdf.js/pull/19716
- Don't overwrite the global alpha when switching to smask mode (bug 1764587) by @calixteman in https://github.com/mozilla/pdf.js/pull/19717
- In the struct tree a kid can be a reference to an MCID entry (issue #19694) by @calixteman in https://github.com/mozilla/pdf.js/pull/19702
- Remove
Array.prototype.reduce
usage from thesrc/core/xfa/template.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19691 - [api-minor] Enable
enableAutoLinking
by default by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19701 - Pass the
XRef
-instance explicitly to theStructTreeRoot
class, and simplify theStructElementNode.prototype.role
getter by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19719 - [Editor] Fix the border color of a tab panel in HCM (bug 1956110) by @calixteman in https://github.com/mozilla/pdf.js/pull/19722
- [Editor] in the signature UI, disable the description input if there is no signature (bug 1956114) by @calixteman in https://github.com/mozilla/pdf.js/pull/19725
- Use
Util.rectBoundingBox
more in the annotation code (PR 19713 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19726 - [Editor] Set an aria-description for an added signature (bug 1956513) by @calixteman in https://github.com/mozilla/pdf.js/pull/19728
- Update @fluent/dom to 0.10.1 by @calixteman in https://github.com/mozilla/pdf.js/pull/19730
- Pre-apply the transform when building the
Path2D
objects for Type3-fonts by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19731 - [Editor] Add a border to the undo button in the snackbar in order to make a contrast (bug 1952563) by @calixteman in https://github.com/mozilla/pdf.js/pull/19734
- Spell "properly" in viewer integration-test names by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19740
- Simplify handling of the color-parameter in
TilingPattern
(PR 4824 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19737 - Shorten the
PDFViewerApplication._initializeViewerComponents
method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19720 - Reduce duplication when specifying the fn-operations in
buildPaintImageXObject
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19739 - [api-minor] Attempt to improve support for using the PDF.js builds with Vite by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19733
- Apply char/word-spacing correctly for missing Type3-glyphs by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19735
v5.0.375
PDF.js 5.0 is a major release that contains a number of API changes, features and bugfixes.
The following significant new features are highlighted:
- Improved JPEG 2000 decoding support
- The OpenJPEG decoder was moved into a separate
.wasm
file, which requires setting a newwasmUrl
API option in order to use it; see PR https://github.com/mozilla/pdf.js/pull/19329. - A (much slower) JavaScript OpenJPEG fallback decoder was added (also uses the
wasmUrl
API option) for environments without WebAssembly support; see PR https://github.com/mozilla/pdf.js/pull/19525.
- The OpenJPEG decoder was moved into a separate
- Support for ICC profiles
- This requires WebAssembly support, and that the
wasmUrl
API option is set; see PR https://github.com/mozilla/pdf.js/pull/19564. - Use an ICC profile to improve CMYK to RGB color conversion, which requires setting a new
iccUrl
API option in order to use it; see PR https://github.com/mozilla/pdf.js/pull/19620. - Currently Lab profiles are not supported, which is tracked in bug 1717767.
- This requires WebAssembly support, and that the
- Improved rendering of large pages in the viewer
- Render the currently visible portion of pages at full resolution, once we've reached the size limits and are falling back to CSS-zooming; see PR https://github.com/mozilla/pdf.js/pull/19128.
- Limit the maximum canvas dimensions, to avoid rendering breaking and canvases being empty; see PR https://github.com/mozilla/pdf.js/pull/19604.
- Enable creation of hyperlinks, in the viewer, from text that look like URLs
- This is disabled by default because of some remaining issues, but can be enabled in the viewer with the
enableAutoLinking
option/preference; see PR https://github.com/mozilla/pdf.js/pull/19110.
- This is disabled by default because of some remaining issues, but can be enabled in the viewer with the
The following significant changes are highlighted (which may require changes in third-party PDF.js implementations):
- Addition of a couple of new CSS variables, that e.g. the text and annotation layers now depend upon; see PR https://github.com/mozilla/pdf.js/pull/19469.
- Removal of a couple of old exceptions; see PR https://github.com/mozilla/pdf.js/pull/19264.
The complete list of changes in this release is shown below. If you're upgrading to PDF.js 5.0 we recommend checking the changes prefixed with [api-minor]
and [api-major]
since those might require updates to your code.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19276 - Remove the
getSelectedEditors
integration test helper function by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19277 - Use
Dict
iteration more (PR 19051 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19278 - Skip LinkAnnotations when collecting field objects (issue 19281) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19289
- Use the
waitForUnselectedEditor
integration test helper function more by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19290 - Implement a commit helper function for the freetext integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19291
- Let be more tolerant with predefined phone number format by @calixteman in https://github.com/mozilla/pdf.js/pull/19280
- Update the toggle-button css after the changes in m-c (bug 1940085) by @calixteman in https://github.com/mozilla/pdf.js/pull/19295
- Remove unused CSS variables by @calixteman in https://github.com/mozilla/pdf.js/pull/19300
- Remove the fuzz tests (issue 19297) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19307
- Access the bbox/background data correctly in the
MeshShadingPattern
class (issue 18816) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19305 - [Editor] Set a unique id for each element in the draw layer by @calixteman in https://github.com/mozilla/pdf.js/pull/19309
- [Editor] Don't try to use an non-existing canvas when rendering an in visible existing stamp editor by @calixteman in https://github.com/mozilla/pdf.js/pull/19311
- [Editor] Improve zooming with a pinch gesture while drawing by @calixteman in https://github.com/mozilla/pdf.js/pull/19312
- Update dependencies to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19313
- Re-use existing helper functions in
FontRendererFactory
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19317 - Upgrade Puppeteer to version 24.0.0 by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19318
- Improve performance when reading very large TrueType "cmap" tables (issue 19319) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19321
- Enable editor when double-clicking on stamp annotation by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19320
- Access the number of components correctly in JPEG 2000 images with color space entries (issue 19326) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19327
- Allow searching for number-number on two lines by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19324
- [api-major] Add openjpeg.wasm to pdf.js (bug 1935076) by @calixteman in https://github.com/mozilla/pdf.js/pull/19329
- [api-major] Replace
MissingPDFException
andUnexpectedResponseException
with one exception by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19264 - Bump library version to
5.0
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19332 - Handle JPX wasm fetch-response errors correctly (PR 19329 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19333
- Reduce console spam when running tests in Firefox by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19335
- Handle the case where openjpeg.wasm is missing by @calixteman in https://github.com/mozilla/pdf.js/pull/19340
- Simplify the JSDocs for the various
getDocument
Factory-parameters by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19331 - Inline the default Factory-definitions in
getDocument
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19341 - Update dependencies to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19342
- Implement helper functions for (un)selecting an editor in the integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19344
- Centralize the editor selector definitions in the stamp editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19350
- Centralize the editor selector definitions in the ink editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19351
- Replace the EXIF-block with dummy data to prevent JPEG images being rotated (bug 1942064) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19356
- Enable the
import/no-restricted-paths
ESLint plugin rule for the viewer by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19353 - Support multiple wasm-files in the development viewer by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19337
- Correctly render the glyph outline when it has a stroke pattern by @calixteman in https://github.com/mozilla/pdf.js/pull/19361
- [Editor] Ensure that
highlightSelection
waits until we've fully updated the editing-mode (issue 19369) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19371 - [GENERIC viewer] Re-initialize the viewer-toolbar
ColorPicker
for each PDF document by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19372 - [Editor] Don't scroll when drawing (issue 17327) by @avdoseferovic in https://github.com/mozilla/pdf.js/pull/19338
- [api-major] Change viewer component
render
-methods to take parameter objects by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19365 - [Editor] Add validation for the target element of curve endpoints by @Hydraulicus in https://github.com/mozilla/pdf.js/pull/19373
- Bump undici from 6.19.8 to 6.21.1 by @dependabot in https://github.com/mozilla/pdf.js/pull/19382
- Remove unused
isInEditingMode
method (PR 19311 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19381 - Enable the "checks that the viewer re-exports the expected API functionality" unit-test in Node.js by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19358
- [api-minor] Simplify clean-up of page resources after rendering by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19368
- Handle empty BigInt64Array/BigUint64Array in the
isNumberArray
helper by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19384 - Introduce a
readInt16
helper function in thesrc/core/core_utils.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19388 - Support the password field-flag in TextWidgetAnnotation (issue 19389) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19390
- [Editor] (WIP) Add a new tool in order to add an handwritten signature to a pdf (bug 1942343) by @calixteman in https://github.com/mozilla/pdf.js/pull/19339
- Initialize the image-options, on the worker-thread, once per document by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19392
- Use fewer
hasFieldFlag
calls in thesrc/core/annotation.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19393 - Move the array containing the supported image mime types in display_utils by @calixteman in https://github.com/mozilla/pdf.js/pull/19394
- Avoid to remove the active overlay when a cancelled dialog (like the file picker) was called from a dialog by @calixteman in https://github.com/mozilla/pdf.js/pull/19395
- [Editor] Add some functions in order to extract contours from text and to generate a drawing from a drawn signature by @calixteman in https://github.com/mozilla/pdf.js/pull/19396
- Add width/height getters in the
Annotation
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19397 - Add width/height getters in the
AnnotationElement
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19402 - Replace uninformative README badge (issue 19406) by @hamirmahal in https://github.com/mozilla/pdf.js/pull/19407
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19404
- Centralize the editor selector definitions in the highlight editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19405
- Remove the
color-mix
fallback used with PopupAnnotations by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19408 - Centralize the editor selector definitions in the freetext editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19410
- Bundle wasm-files in
pdfjs-dist
(PR 19329 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19415 - [api-minor] Add more validation for the
cMapUrl
,standardFontDataUrl
, andwasmUrl
parameters by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19416 - [Editor] Add a new dialog for the signature editor (bug 1945574) by @calixteman in https://github.com/mozilla/pdf.js/pull/19414
- Enable automatic URL linking (bug 1019475) by @ryzokuken in https://github.com/mozilla/pdf.js/pull/19110
- Enable autolinking in Firefox (bug 1019475) by @calixteman in https://github.com/mozilla/pdf.js/pull/19429
- Fix
--save-warning-color
CSS variable typo (PR 19414 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19431 - [GENERIC viewer] Add Fluent
PLATFORM
function (PR 19414 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19430 - Use the
FeatureTest
helper in thesrc/display/font_loader.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19432 - [Editor] Add an icon for the signature tool and move it before the highlight one by @calixteman in https://github.com/mozilla/pdf.js/pull/19433
- Disable the "Blank issue" alternative when using the GitHub "New issue"-button by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19419
- Use the
getPdfColorArray
helper more in thesrc/core/annotation.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19423 - Combine the main-thread message handlers for CMap-, StandardFontData-, and Wasm-files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19436
- [api-minor] Simplify the
TextLayer.#getAscent
fallback (PR 12896 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19399 - Use
crypto.getRandomValues
unconditionally in thesrc/core/crypto.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19450 - Check for the correct link-id prefix in "must not add links when unnecessary" integration-test (PR 19110 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19447
- Shorten the
MeshStreamReader.prototype.readBits
method a little bit by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19446 - [api-minor] Update the minimum supported Google Chrome version to 110 by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19454
- [Editor] Add the ability to print and save some newly added signatures (bug 1946795) by @calixteman in https://github.com/mozilla/pdf.js/pull/19437
- Replace a couple of loops with
TypedArray.prototype.fill()
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19456 - Isolate the ink editor integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19457
- Ignore the URLs when checking if inferred links overlap existing LinkAnnotations (PR 19110 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19449
- Check that the annotationLayer is still active before injecting inferred links (PR 19110 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19460
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19458
- Create the
borderStyle
of inferred links lazily (PR 19110 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19461 - [Editor] Add the possibility to compress/decompress the signature data in order to store them in the logins storage in Firefox (bug 1946171) by @calixteman in https://github.com/mozilla/pdf.js/pull/19425
- Catch and ignore any errors during auto-linking parsing (PR 19110 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19464
- Fix the color of the background button when hovering it by @calixteman in https://github.com/mozilla/pdf.js/pull/19472
- [api-major] Apply the
userUnit
using CSS, to fix the text/annotation layers (bug 1947248) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19469 - [Editor] Populate the 'Add signature' menu with the saved signatures (bug 1947828) by @calixteman in https://github.com/mozilla/pdf.js/pull/19478
- Slightly shorten an
Array.from
usage in theSignatureManager
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19485 - Move the auto-link handling into its own
PDFPageView
helper-method, and dispatch a "linkannotationsadded" event by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19475 - [GenericL10n] Fetch the language bundles in parallel to reduce load time by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19481
- [Editor] Add the possibility to change a signature description (bug 1948116) by @calixteman in https://github.com/mozilla/pdf.js/pull/19486
- Add a new
closeIfActive
method in theOverlayManager
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19487 - Search for destinations in both /Names and /Dests dictionaries (issue 19474) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19476
- Add some unicode mapping for ligatures when writing the cmap table in the font (bug 1946181) by @calixteman in https://github.com/mozilla/pdf.js/pull/19427
- Shorten the
CipherTransformFactory.prototype.#buildObjectKey
method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19496 - Check more of the stream when looking for commands after inline image (issue 19494) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19495
- Ensure that the
useWorkerFetch
fallback value is always a boolean by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19499 - [Editor] Add two integration tests for the signature UI by @calixteman in https://github.com/mozilla/pdf.js/pull/19500
- Remove a few
eslint-disable
statements in theweb/
folder by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19503 - [Editor] Add a scrollbar to the signature doorhanger when it's overflowing (bug 1948771) by @calixteman in https://github.com/mozilla/pdf.js/pull/19507
- [Editor] Scale the signature editor when it's too large (bug 1948741) by @calixteman in https://github.com/mozilla/pdf.js/pull/19506
- [JS] Skip throwing actions by @calixteman in https://github.com/mozilla/pdf.js/pull/19508
- [Editor] Wait for switching to stamp mode before adding a new editor when dnd'ing an image by @calixteman in https://github.com/mozilla/pdf.js/pull/19511
- Fix all outstanding ESLint
arrow-body-style
warnings by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19504 - [Editor] Add two integration tests for the signature feature by @calixteman in https://github.com/mozilla/pdf.js/pull/19512
- Don't cache free/missing XRef entries (issue 19510) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19513
- Fix autolinking errors by @ryzokuken in https://github.com/mozilla/pdf.js/pull/19470
- [Editor] Remove the error panel when the user click on an other tab (bug 1949201) by @calixteman in https://github.com/mozilla/pdf.js/pull/19516
- [Editor] Make the editing toolbar buttons text visible when hovered in HCM with Desert theme (bug 1949417) by @calixteman in https://github.com/mozilla/pdf.js/pull/19522
- [Editor] Fix the outline of a focused button in the doorhanger while navigating with the keyboard by @calixteman in https://github.com/mozilla/pdf.js/pull/19523
- [Editor] Fix the color of the labels in the editing doorhangers by @calixteman in https://github.com/mozilla/pdf.js/pull/19524
- Move the EXIF-block replacement into
JpegStream
(PR 19356 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19518 - Introduce some
URL.parse()
usage in the code-base by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19493 - Consider textRise when showing Type3 font glyphs (issue 19532) by @Xiphoseer in https://github.com/mozilla/pdf.js/pull/19533
- [api-minor] Render high-res partial page views when falling back to CSS zoom (bug 1492303) by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19128
- [Editor] Add a test for copy & paste a signature editor by @calixteman in https://github.com/mozilla/pdf.js/pull/19534
- Provide a js fallback when the wasm version of openjpeg is failing to load (bug 1935076) by @calixteman in https://github.com/mozilla/pdf.js/pull/19525
- Disable the loading of node types in the type tests by @stof in https://github.com/mozilla/pdf.js/pull/19531
- [api-minor] Re-factor how the
useWorkerFetch
option is used internally by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19537 - [Editor] Fix the position in the page of a drawing after it has been moved with the keyboard by @calixteman in https://github.com/mozilla/pdf.js/pull/19538
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19542
- Refactor the editor integration test helper functions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19543
- Fix the link for issue5939.pdf by @hecerinc in https://github.com/mozilla/pdf.js/pull/19545
- [Editor] Shift the signature editor when pasted by @calixteman in https://github.com/mozilla/pdf.js/pull/19539
- Add a comment 'THIS FILE IS GENERATED - DO NOT EDIT' in openjpeg files generated with emscripten by @calixteman in https://github.com/mozilla/pdf.js/pull/19552
- Fix the
assert
inFontLoader.prototype.loadSystemFont
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19551 - [Editor] Add some telemetry for the signature editor (bug 1945827) by @calixteman in https://github.com/mozilla/pdf.js/pull/19554
- Pad rev 4 encryption keys to be >= 16 bytes (issue 19484) by @rossj in https://github.com/mozilla/pdf.js/pull/19555
- Reset
#renderError
onRenderingCancelledException
(PR 19128 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19558 - Send
disableFontFace
andfontExtraProperties
as part of the exported font-data by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19548 - [Editor] Fix the telemetry for the signature stuff by @calixteman in https://github.com/mozilla/pdf.js/pull/19565
- [api-minor] Stop exporting, by default, a few additional Font properties (PR 11777 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19549
- Use more local variables in
PDFViewerApplication._initializeViewerComponents
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19556 - Abort various timeouts, in
PDFViewer
, when closing the document (PR 19128 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19557 - Extend
getGlyphMapForStandardFonts
with some Cyrillic entries (issue 19550) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19562 - Invoke
TranslatedFont.prototype.loadType3Data
only once per font by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19563 - Don't attempt to use auto-linking in XFA documents (PR 19110 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19574
- Reenable viewerCssTheme option for Firefox by @hecerinc in https://github.com/mozilla/pdf.js/pull/19544
- Fix the build of the openjpeg decoder in order to use an optimized build of the openjpeg library (bug 1951128) by @calixteman in https://github.com/mozilla/pdf.js/pull/19584
- Add a
GlobalColorSpaceCache
to reduce unnecessary re-parsing by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19583 - Try reducing flakiness of CSS-only zoom test by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19578
- Add the missing return type for
PDFWorker.fromPort()
by @yjoer in https://github.com/mozilla/pdf.js/pull/19571 - Don't bundle the
FakeMLManager
class in regular builds by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19568 - Replace a loop with
TypedArray.prototype.fill()
in theRunLengthStream
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19589 - Write string-data into the
.error
-file created for broken test-manifest links (issue 19579) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19581 - Be sure to consume responses in case of error in downloading test files (issue 19580) by @dhdaines in https://github.com/mozilla/pdf.js/pull/19582
- Re-use the
isValidExplicitDest
helper function in the worker/viewer by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19577 - Use arrow function with various Array methods by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19596
- Fix autolinking with highlighted search results by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19576
- Use arrow functions with some
Promise.then
calls by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19597 - Also cache "sub" ColorSpaces globally (PR 19583 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19598
- [api-minor] Limit the maximum canvas width/height, in addition to its total area (bug 1943094) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19604
- Use the latest emsdk version to compile openjpeg decoder by @calixteman in https://github.com/mozilla/pdf.js/pull/19585
- [api-minor] Support using ICC profiles in using qcms (bug 860023) by @calixteman in https://github.com/mozilla/pdf.js/pull/19564
- Remove
ColorSpaceUtils.parseAsync
and simplify the ColorSpace "API-surface" by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19599 - Simplify the
ColorSpaceUtils.singletons
handling (PR 19564 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19607 - Update l10n files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19608
- [Editor] Remove the unused
opacityToHex
helper function (PR 19093 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19610 - Introduce a helper function for clamping a value to a range by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19617
- [Editor] In edit mode, a non-editable stamp must be visible after the page is rendered by @calixteman in https://github.com/mozilla/pdf.js/pull/19618
- Fix the
#savedHasOwnCanvas
handling in theStampAnnotation
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19619 - Do not constantly render the detail canvas on zoom (bug 1952496) by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19622
- Use the
MathClamp
helper function more (PR 19617 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19628 - Remove the
PDFFunctionFactory.createFromArray
method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19623 - Re-factor the
src/core/crypto.js
file by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19629 - Limit the maximum thumbnail canvas width/height, similar to pages (PR 19604 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19621
- Let SMask/Mask images fallback to the parent image dimensions (issue 19611) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19613
- Improve text-selection for Type3 fonts, using
d0
operators, with empty /FontBBox-entries (issue 19624) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19625 - Support the
maxCanvasPixels
option in the thumbnails code by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19635 - [api-minor] Use an icc profile for converting CMYK to RGB by @calixteman in https://github.com/mozilla/pdf.js/pull/19620
- [Editor] Make sure the save checkbox isn't focusable when saving is disabled (bug 1952558) by @calixteman in https://github.com/mozilla/pdf.js/pull/19636
- [Editor] Add an aria label to an added signature (bug 1952571) by @calixteman in https://github.com/mozilla/pdf.js/pull/19637
- Always use the absolute value of the line thickness (issue 19633) by @calixteman in https://github.com/mozilla/pdf.js/pull/19639
- Don't close the
secondaryToolbar
when clicking inside it (PR 18385 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19640 - [Editor] Fix the style of the buttons in dialog (bug 1953003) by @calixteman in https://github.com/mozilla/pdf.js/pull/19642
- Let
Lexer.prototype.getNumber
treat more cases of a single minus sign as zero (bug 1953099) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19647 - Don't shadow the
TouchManager.prototype.MIN_TOUCH_DISTANCE_TO_PINCH
value by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19646 - Update l10n files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19643
- Introduce a common base class for the
PDF17
andPDF20
crypto classes by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19644 - Add an
OutputScale
static method to get thedevicePixelRatio
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19645 - [Editor] Fix the role of the different editors in order to make them interactive elements (bug 1953290) by @calixteman in https://github.com/mozilla/pdf.js/pull/19648
- Shorten the
src/core/crypto.js
file a little bit by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19650 - [Editor] Fix the title of saved signature button (bug 1953298) by @calixteman in https://github.com/mozilla/pdf.js/pull/19649
- [Editor] Fix variable name in the ftl file by @calixteman in https://github.com/mozilla/pdf.js/pull/19651
- [Editor] Remove useless css variable by @calixteman in https://github.com/mozilla/pdf.js/pull/19652
- Remove all the translatable strings from the html by @calixteman in https://github.com/mozilla/pdf.js/pull/19653
- Replace the regular expression in
GenericL10n.#getPaths
with simple string parsing by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19657 - Slightly shorten a couple of
MeshStreamReader
methods by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19656 - Inline the
PDFThumbnailView.prototype.#finishRenderTask
helper method by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19661
v4.10.38
This release contains improvements for accessibility, the annotation editor, font conversion, performance, SMasks and the viewer.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19178 - When zooming replace the css-zoomed canvas by the new one only when rendering is finished by @calixteman in https://github.com/mozilla/pdf.js/pull/19164
- Ensure that a missing/invalid "Content-Range" header is handled in
PDFNetworkStream
(issue 19075) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19114 - Do not stringify errors when logging them by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19148
- Get the first codepoint instead of the first char when using the toUnicode map by @calixteman in https://github.com/mozilla/pdf.js/pull/19184
- Support toggling the
PDFFindBar
options with theEnter
key (issue 19175) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19185 - Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19190
- Print more warnings about potential problems in Node.js environments by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19191
- Fix intermittent issues in the
issue14307.pdf
integration tests by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19192 - Add a ref test for setting disableFontFace to true by @calixteman in https://github.com/mozilla/pdf.js/pull/19197
- Take the
userUnit
into account in thePageViewport
class (issue 19176) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19196 - Improve perfs of the font renderer by @calixteman in https://github.com/mozilla/pdf.js/pull/19189
- Remove the raw path-strings after creating the actual
Path2D
glyph-objects by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19200 - Update OpenJPEG to 2.5.3 by @calixteman in https://github.com/mozilla/pdf.js/pull/19203
- [Editor] Don't commit the current drawing while zooming by @calixteman in https://github.com/mozilla/pdf.js/pull/19202
- Make sure the canvas is always the first child of its wrapper by @calixteman in https://github.com/mozilla/pdf.js/pull/19204
- [Editor] When resizing a stamp annotation, the opposite corner must stay fixed by @calixteman in https://github.com/mozilla/pdf.js/pull/19201
- Simplify logic to insert canvas as first element by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19206
- Fix intermittent failures when moving a freetext annotation in integration tests by @calixteman in https://github.com/mozilla/pdf.js/pull/19198
- Update Puppeteer to version 23.10.2 by @calixteman in https://github.com/mozilla/pdf.js/pull/19208
- Update Puppeteer to version 23.10.3 by @calixteman in https://github.com/mozilla/pdf.js/pull/19210
- [Editor] Improve drawing on a touch screen. by @calixteman in https://github.com/mozilla/pdf.js/pull/19209
- [Editor] Avoid to focus an existing editor when enabling the layer by @calixteman in https://github.com/mozilla/pdf.js/pull/19215
- Move the pinch stuff in its own file in order to use for editors by @calixteman in https://github.com/mozilla/pdf.js/pull/19216
- [Editor] Add the ability to resize an editor in using a pinch gesture by @calixteman in https://github.com/mozilla/pdf.js/pull/19219
- Don't remove trailing regular spaces from the "raw" response headers (issue 19205) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19214
- [api-minor] Remove deprecated
getDocument
options (PR 18776 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19224 - Bump library version to
4.10
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19225 - Disable touch-zooming, in the viewer, if
AbortSignal.any
is unsupported (PR 19216 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19226 - Add basic support for non-embedded HelveticaLTStd-Bold fonts (issue 19234) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19236
- Take the absolute value of the font size when the annotation contents is in xhtml (bug 1938087) by @calixteman in https://github.com/mozilla/pdf.js/pull/19238
- Disable the
handle reading ranges with missing/invalid "Content-Range" header
unit-test in Google Chrome (PR 19114 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19237 - Fix left offset when scrolling to search result by @nicolo-ribaudo in https://github.com/mozilla/pdf.js/pull/19232
- Update dependencies and translations to the most recent versions by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19243
- Add missing
startWorkerTask
calls in the "SaveDocument" handler by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19246 - Improve the test folder structure by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19254
- Remove mention of Bower from the README (PR 15390 follow-up) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19258
- Shorten some
if
-statements in thesrc/core/
folder by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19260 - Remove the unused
glyphNameMap
parameter fromType2Compiled
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19263 - Assert that the
fontMatrix
is always valid incompileGlyph
by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19262 - Reduce duplication when handling "DocException" and "PasswordRequest" messages by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19259
- For images that include SMask/Mask entries, ignore an SMask defined in the current graphics state (bug 986450) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19269
- Update l10n files by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19271
- Remove the
requestRange
/requestFull
methods from theNetworkManager
class by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19273
v4.9.155
This release primarily contains a bugfix for a Node.js-specific regression in the previous release; see #19145 and #19149 for context. Moreover, improvements for the annotation editor are included.
- Bump the stable version in
pdfjs.config
by @timvandermeij in https://github.com/mozilla/pdf.js/pull/19139 - Fix the clickable area for rotated ink annotations by @calixteman in https://github.com/mozilla/pdf.js/pull/19142
- [Editor] Don't focus a newly added drawing if it isn't visible on screen by @calixteman in https://github.com/mozilla/pdf.js/pull/19144
- [Editor] Make ink annotation editable by @calixteman in https://github.com/mozilla/pdf.js/pull/19151
- Add test cases for redirected responses by @Rob--W in https://github.com/mozilla/pdf.js/pull/19074
- Annotation deletion popup (bug 1899731) by @ryzokuken in https://github.com/mozilla/pdf.js/pull/18900
- [Editor] Corrrectly get the words from the alt-text when reporting the telemetry (bug 1929311) by @calixteman in https://github.com/mozilla/pdf.js/pull/19155
- Fix unused css variables (follow-up of #18900) by @calixteman in https://github.com/mozilla/pdf.js/pull/19160
- Introduce
Promise.try()
usage in the code-base by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19161 - Correctly wait for the editor mode when double clicking on an annotation in integration tests by @calixteman in https://github.com/mozilla/pdf.js/pull/19163
- Ensure that the
.toggleButton
, as used in the findbar, always have visible hover/focus state (issue 19165) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19172 - [Editor] Correctly update the current drawing when zooming by @calixteman in https://github.com/mozilla/pdf.js/pull/19174
- Avoid to display an alert or a confirm dialog if the message is empty by @calixteman in https://github.com/mozilla/pdf.js/pull/19177
- Prevent Webpack from resolving
import.meta.url
statements during building (issue 19145) by @Snuffleupagus in https://github.com/mozilla/pdf.js/pull/19149