Releases: mozilla/pdf.js
v4.8.69
This release contains improvements for the annotation editor, font conversion, form rendering, image conversion and the viewer.
Changes since v4.7.76
- Bump the stable version in
pdfjs.config
by @timvandermeij in #18858 - Fix typing logic in the scripting integration tests by @timvandermeij in #18862
- Improve the promise-caching in the
PDFDocument.fieldObjects
getter by @Snuffleupagus in #18871 - Remove the temporary "visibilitychange" listener, in
PDFViewer
, withAbortSignal.any()
by @Snuffleupagus in #18873 - Avoid exceptions in the console with ill-formed flate streams by @calixteman in #18878
- Don't add the grey outline when hovering a selected highlight by @calixteman in #18879
- [Editor] Remove
ColorPicker
event listeners withAbortSignal.any()
(PR 18586 follow-up) by @Snuffleupagus in #18874 - Fix failing integration test on Windows with Chrome by @calixteman in #18860
- Add an option to gulp makeref/browsertest to only run tests with specific ids by @calixteman in #18833
- Move the regular expression caching into the
PDFDateString
class by @Snuffleupagus in #18885 - Remove event listeners with
AbortSignal
in theAltTextManager
class by @Snuffleupagus in #18881 - Don't add attribute 'aria-haspopup' when no popup is rendered for an annotation by @calixteman in #18889
- Clamp the hival parameter of Indexed color space to the range [0; 255] by @calixteman in #18890
- Fallback on gray colorspace when there are no colorspace and no name in the scn/SCN arguments by @calixteman in #18895
- Some jpx images can have a mask by @calixteman in #18899
- implementing optional content radiobutton groups by @agrahn in #18825
- Remove unnecessary options from
removeEventListener
in theweb/app.js
file by @Snuffleupagus in #18893 - Create fewer Objects in
PDFViewerApplication.bindEvents
by @Snuffleupagus in #18898 - Reduce duplication when collecting optional content groups by @Snuffleupagus in #18905
- Handle null parentElement for selection anchor by @hubgit in #18884
- Add the
pdkids
PDF document to the repository by @Snuffleupagus in #18902 - When changing a property on a radio button then change it for the siblings (bug 1922766) by @calixteman in #18916
- Re-factor the
MessageHandler
-class event handler function by @Snuffleupagus in #18888 - Remove event listeners with
AbortSignal
in theGrabToPan
class by @Snuffleupagus in #18919 - [api-minor] Update the
canvas
package to version 3 by @Snuffleupagus in #18922 - Bump library version to
4.8
by @Snuffleupagus in #18924 - Run CI tests in Node.js version 23 by @Snuffleupagus in #18925
- Remove the
eslint-plugin-{fetch-options,html}
andeslint-config-prettier
dependencies by @timvandermeij in #18927 - Update dependencies and translations to the most recent versions by @timvandermeij in #18921
- Simplify localization of the "default-content" in FreeText editors by @Snuffleupagus in #18920
- Replace
eslint-plugin-sort-exports
byeslint-plugin-perfectionist
by @timvandermeij in #18929 - Fix the "Text selection using mouse doesn't jump when hovering on an empty area in a single page" integration test by @timvandermeij in #18923
- Remove
mask-image
duplication for the print/download buttons by @Snuffleupagus in #18930 - Fallback to a standard font if a font-file entry doesn't contain a Stream (issue 18941) by @Snuffleupagus in #18942
- Try to discourage "unrelated" information under
Attach (recommended) or Link to PDF file
in the bug report template (PR 18535 follow-up) by @Snuffleupagus in #18940 - Change the
BaseCMapReaderFactory
fetch-helper to return aUint8Array
by @Snuffleupagus in #18933 - Use ImageDecoder in order to decode jpeg images (bug 1901223) by @calixteman in #18910
- Add a comment in l10n file for the non-standard attribute default-content by @calixteman in #18947
- Always fill the mask with the backdrop color by @calixteman in #18960
- Re-factor the
ImageResizer._goodSquareLength
definition by @Snuffleupagus in #18965 - [api-minor] Remove the
CMapCompressionType
enumeration by @Snuffleupagus in #18951 - Make util.scand a bit more flexible with dates which don't match the given format (bug 1910431) by @calixteman in #18967
- [Editor] Split the long words when showing the alt-text tooltip (bug 1903588) by @calixteman in #18968
- Use a BMP decoder when resizing an image by @calixteman in #18918
- [Editor] Utilize Fluent "better" when localizing the AltText by @Snuffleupagus in #18971
- Allow
StreamsSequenceStream
to skip sub-streams that are not actual Streams (issue 18973) by @Snuffleupagus in #18974 - Improve the implementation of the
PDFDocument.fingerprints
-getter by @Snuffleupagus in #17862 - Simplify the "ReaderHeadersReady" message-handler in the API by @Snuffleupagus in #18977
- [Editor] Refactor the free highlight stuff in order to be able to use the code for more general drawing by @calixteman in #18972
- Re-factor the
toHexUtil
helper (PR 17862 follow-up) by @Snuffleupagus in #18978 - Don't initialize
L10n.#elements
eagerly since it's unused in MOZCENTRAL builds by @Snuffleupagus in #18979 - Change the "FetchBuiltInCMap"/"FetchStandardFontData" message-handlers to be asynchronous by @Snuffleupagus in #18983
- Use the
hexNumbers
structure in thestringToUTF16HexString
helper by @Snuffleupagus in #18993 - Ensure that serializing of StructTree-data cannot fail during loading by @Snuffleupagus in #18990
- Inline the
flushChunks
helper function, used ingetPdfManager
on the worker-thread by @Snuffleupagus in #18992 - Move the various DOM-factories into their own files by @Snuffleupagus in #18988
v4.7.76
This release contains improvements for accessibility, the annotation editor, annotation rendering, font conversion, form rendering, text selection, tiling pattern rendering and the viewer.
Changes since v4.6.82
- Bump the stable version in
pdfjs.config
by @timvandermeij in #18678 - [Editor] Make the focused stamp annotation more clear from a screen reader point of view (bug 1911994) by @calixteman in #18664
- [Editor] Make highlight annotations editable (bug 1883884) by @calixteman in #18427
- Update dependencies and translations to the most recent versions by @timvandermeij in #18679
- Use
Headers
consistently in the differentIPDFStream
implementations by @Snuffleupagus in #18673 - [Editor] Make the stamp annotations alt text readable by either VO or NVDA (bug 1912001) by @calixteman in #18658
- [Editor] Remove the disclaimer when the user is editing the alt-text in the new alt-text modal (bug 1911764) by @calixteman in #18670
- Improve the
StructTreeLayerBuilder.render
method by @Snuffleupagus in #18689 - In the autoprint integration test, resolve the promise on 'afterprint' event by @calixteman in #18690
- [Editor] Avoid to throw when an highlight annotation is resetted by @calixteman in #18697
- Make tagged images visible for screen readers (bug 1708040) by @calixteman in #18692
- Avoid to have a white line around the canvas by @calixteman in #18698
- Use "full" localization ids in the
ColorPicker
class (PR 18674 follow-up) by @Snuffleupagus in #18705 - Use "full" localization ids in the
AltText
class (PR 18674 follow-up) by @Snuffleupagus in #18706 - Use response-
Headers
in the differentIPDFStream
implementations by @Snuffleupagus in #18682 - Prevent
.visibleMediumView
from overriding already hidden elements (issue 18704, PR 18596 follow-up) by @Snuffleupagus in #18707 - [CRX] Migrate Chrome extension to Manifest Version 3 by @Rob--W in #18681
- [CRX] Detect availability of DNR responseHeaders before use by @Rob--W in #18711
- Update dependencies and translations to the most recent versions by @timvandermeij in #18708
- [JS] Let AFSpecial_KeystrokeEx match a format without 'decoration' (bug 1916714) by @calixteman in #18718
- [Editor] Avoid to have the ML disclaimer when the ML engine isn't ready (bug 1917543) by @calixteman in #18719
- [Editor] Avoid to have a stamp editor resizing itself by @calixteman in #18716
- Remove ununsed static
HighlightEditor._l10nPromise
field by @Snuffleupagus in #18724 - Consume any pending path before drawing an annotation by @calixteman in #18726
- Consider foo-\nBar as a compound word by @calixteman in #18730
- Ensure that textLayers can be rendered in parallel, without interfering with each other by @Snuffleupagus in #18731
- [JS] Correctly format floating numbers when they're close to an integer (bug 1918115) by @calixteman in #18737
- Bump dset from 3.1.3 to 3.1.4 by @dependabot in #18738
- [Editor] Avoid an extra new line when serializing a FreeText annotation (bug 1897909) by @calixteman in #18740
- Fluent: use explicit NUMBER() in plural variants by @flodolo in #18741
- Use the "pageColorsBackground" option as background-color for non-loaded pages (issue 18680) by @Snuffleupagus in #18742
- [CRX] Enable WebAssembly in Chrome extension by @Rob--W in #18748
- [CRX] Fix feature detect of DNR responseHeaders option by @Rob--W in #18728
- [Editor] Take into account the device pixel ratio when drawing an added image by @calixteman in #18749
- Simplify the code that picks the appropriate NetworkStream-implementation by @Snuffleupagus in #18756
- Rename the toolbar buttons in order to free their current names by @calixteman in #18757
- Read a signed integer when using PUSHW in sanitizing a font (bug 1919513) by @calixteman in #18760
- Fix the rendering of the different separators we've in the UI by @calixteman in #18761
- Link to the new issue templates from the README (PR 18308 follow-up) by @Snuffleupagus in #18763
- Ignore non-existing /Shading resources during parsing (issue 18765) by @Snuffleupagus in #18766
- Use
fs/promises
in the Node.js unit-tests (PR 17714 follow-up) by @Snuffleupagus in #18772 - Update dependencies and translations to the most recent versions by @timvandermeij in #18771
- [api-minor] Pass
CanvasFactory
/FilterFactory
, rather than instances, togetDocument
by @Snuffleupagus in #18776 - Bump library version to
4.7
by @Snuffleupagus in #18777 - [Editor] Don't show the ml toggle button when the ml is disabled (bug 1920515) by @calixteman in #18779
- Refactor the toolbar html & css to improve its overall accessibility (bug 1171799, bug 1855695) by @calixteman in #18385
- Update
typescript
to version 5.6.2 by @timvandermeij in #18781 - Remove useless css variable --editor-toolbar-base-offset by @calixteman in #18783
- Remove duplicated --toolbar-height definition in the css by @calixteman in #18784
- Correctly compute the font size when printing a text field with an auto font size (bug 1917734) by @calixteman in #18790
- Increase the size of the toolbar depending on the uidensity (bug 1171799) by @calixteman in #18786
- Add Calixte to the list of authors by @sylvestre in #18791
- Remove the unused
splitToolbarButton
CSS class (PR 18385 follow-up) by @Snuffleupagus in #18795 - Unify separate
#toolbarContainer
-blocks in the CSS (PR 18385 follow-up) by @Snuffleupagus in #18796 - Fix the rendering of tiling pattern when the steps are lower than the tile dimensions (bug 1837738) by @calixteman in #18798
- Slightly re-factor the
transportFactory
initialization ingetDocument
by @Snuffleupagus in #18785 - Remove
trackTransform
arguments fromCachedCanvases.getCanvas
-calls (PR 15281 follow-up) by @Snuffleupagus in #18799 - Add basic support for non-embedded GillSansMT fonts (issue 18801) by @Snuffleupagus in #18802
- [Editor] When deleting an annotation with popup, then delete the popup too by @calixteman in #18800
- [Editor] Avoid to have a selected stamp annotation on top of the secondary toolbar (bug 1911980) by @calixteman in #18793
- Ensure that the CursorTools-buttons are disabled e.g. during editing (PR 15522 follow-up) by @Snuffleupagus in #18812
- [api-minor] Update the minimum supported Google Chrome version to 103 by @Snuffleupagus in #18822
- Re-factor how
PDFLayerViewer
decides if the UI needs to updated on "optionalcontentconfigchanged" events by @Snuffleupagus in #18829 - Make the secondary menu button usable with the keyboard when NVDA is enabled by @calixteman in #18830
- Write the display flags in F entry when saving an annotation (issue 18072) by @calixteman in #18824
- Fix
toolbarViewer
/toolbarContainer
regressions (PR 18385, 18786 follow-up) by @Snuffleupagus in #18831 - [Editor] Add the possibility to save an updated stamp annotation (bug 1921291) by @calixteman in #18805
- [GV] Increase the height (48px) of the toolbar in order to fit the a11y recommendations (bug 1838602) by @calixteman in #18837
- [Editor] Make the editor deserialization async by @calixteman in #18843
- Remove the
PDFViewer.annotationEditorMode
setter event listeners withAbortSignal.any()
by @Snuffleupagus in #18842 - [Editor] Make stamp annotations editable (bug 1921291) by @calixteman in https://github.com/mozilla/pdf.js/pul...
v4.6.82
This release contains improvements for the annotation editor, font rendering, form rendering, performance, text selection and the viewer.
Changes since v4.5.136
- Bump the stable version in
pdfjs.config
by @timvandermeij in #18500 - Shorten the errors mentioning API parameters in
BaseCMapReaderFactory
andBaseStandardFontDataFactory
by @Snuffleupagus in #18502 - Initialize all user-options upfront in AppOptions by @Snuffleupagus in #18501
- Disable link annotations during text selection by @nicolo-ribaudo in #18481
- Ignore non-dictionary nodes when parsing StructTree data (issue 18503) by @Snuffleupagus in #18504
- Stop testing in Node.js 21 since it's reached end-of-life by @Snuffleupagus in #18505
- Update dependencies to the most recent versions by @timvandermeij in #18506
- Remove
PDFWorkerUtil
and move its contents intoPDFWorker
instead by @Snuffleupagus in #18507 - Remove the
globals
dependency by @timvandermeij in #18509 - Improve how the findbar's toggle button is referenced in the viewer code by @timvandermeij in #18510
- [Editor] Implement the new alt text flow (bug 1909604) by @calixteman in #18492
- [Editor] Add a checkerboard behind the image preview in the new alt-text dialog in order to see its potential transparency by @calixteman in #18516
- [Editor] Allow Float32Array for quadpoints in annotations (bug 1907958) by @calixteman in #18526
- Give all HTML button elements a type by @timvandermeij in #18517
- Introduce a CSS variable for the toolbar height (bug 1171799) by @timvandermeij in #18518
- Further emphasize the importance of
Attach (recommended) or Link to PDF file
in the bug report template by @Snuffleupagus in #18535 - Move all event listeners into
Toolbar.prototype.#bindListeners
by @Snuffleupagus in #18523 - [Editor] Add a new dialog for alt-text settings (bug 1909604) by @calixteman in #18537
- [Editor] Use the color defined for the message bar foreground by @calixteman in #18539
- [Editor] Fix l10n issues by @calixteman in #18538
- [Editor] Don't create the image settings dialog if new alt-text is disabled by @calixteman in #18540
- [Editor] Avoid to have the create alt-text button without a click listener by @calixteman in #18543
- Fix the color of the buttons in a dialog in HCM by @calixteman in #18547
- Link to the list of supported browsers in the bug report template by @Snuffleupagus in #18542
- Inline single-line event handlers in the
web/app.js
file by @Snuffleupagus in #18527 - [Editor] Load the model when the user switch to the stamp editing mode by @calixteman in #18546
- Improve the larger event listeners in the
web/app.js
file by @Snuffleupagus in #18544 - [Editor] Guess alt text even when showing the dialog is disabled by @calixteman in #18541
- Stop sending the unused
options
parameter to various download-methods in the viewer by @Snuffleupagus in #18551 - Empty fields are 0 when using AFSimple_Calculate by @calixteman in #18552
- Update the Babel plugin to remove empty static blocks by @nicolo-ribaudo in #18562
- Update dependencies to the most recent versions by @timvandermeij in #18554
- Use the
waitForEvent
helper function in the text layer integration tests by @timvandermeij in #18555 - Define a few editor event handler functions inline by @Snuffleupagus in #18560
- [Editor] Update the disclaimer string in the new alt-text dialog (bug 1911738) by @calixteman in #18570
- Remove obsolete
otherPages
variable from the scripting integration tests by @timvandermeij in #18567 - Don't stop calculating field values when a Calculate callback throws by @calixteman in #18566
- [Editor] Add the uiManager to the window object when testing by @calixteman in #18574
- [Editor] Move the AI icon on the top of its parent div by @calixteman in #18575
- [Editor] Dispatch changes in prefs enableAltTextModelDownload and enableGuessAltText to the viewer (bug 1912024) by @calixteman in #18573
- Revert "[Editor] Dispatch changes in prefs enableAltTextModelDownload and enableGuessAltText to the viewer (bug 1912024)" by @calixteman in #18578
- Dispatch changes in prefs enableAltTextModelDownload and enableGuessAltText to the viewer (bug 1912024) by @calixteman in #18579
- [Editor] Pass a buffer instead of a typed array when passing image data to the model by @calixteman in #18580
- Enable the
unicorn/{prefer-includes,throw-new-error}
linting rules by @timvandermeij in #18571 - Remove the
eslint-plugin-mozilla
dependency by @timvandermeij in #18583 - Group and scope the findbar rules using CSS nesting by @timvandermeij in #18568
- [Editor] Change the background color of the image preview in the new alt text dialog by @calixteman in #18584
- [Editor] Remove event listeners with
AbortSignal.any()
by @Snuffleupagus in #18586 - Check that
AbortSignal.any()
is supported inPDFViewer
too (PR 18586 follow-up) by @Snuffleupagus in #18587 - Revert "[Editor] Pass a buffer instead of a typed array when passing image data to the model" by @calixteman in #18588
- [Editor] Add a first test to test the new alt text flow by @calixteman in #18581
- [Firefox] Remove the "loadaiengineprogress" listener with
AbortSignal.any()
by @Snuffleupagus in #18592 - Remove the sidebar resizing event listeners with an
AbortController
by @Snuffleupagus in #18593 - [Editor] Add the telemetry for the new alt text (bug 1912500) by @calixteman in #18589
- Group and scope the secondary toolbar button container/icon rules using CSS nesting by @timvandermeij in #18595
- Remove the
secondaryToolbarButton
CSS class by @timvandermeij in #18596 - Group and scope the secondary toolbar rules using CSS nesting by @timvandermeij in #18597
- Limit base-class initialization checks to development and TESTING modes by @Snuffleupagus in #18598
- Remove the
enableHighlightEditor
preference by @Snuffleupagus in #18594 - [api-minor] Allow specifying custom match logic in PDFFindController by @nicolo-ribaudo in #18549
- Bump library version to
4.6
by @Snuffleupagus in #18604 - Improve the viewer CSS after nesting the findbar and secondary toolbar rules by @timvandermeij in #18601
- Handle the "switchannotationeditorparams" event in the editor-code (issue 18196) by @Snuffleupagus in #18605
- Link to official releases and the demo viewer in the bug report template by @Snuffleupagus in #18610
- Fix the telemetry for the new alt-text flow by @calixteman in #18611
- Enable disabled integration tests for Firefox by @calixteman in #18613
- Shorten the
PDFViewerApplication._parseHashParams
method by @Snuffleupagus in #18612 - Update dependencies and translations to the most recent versions by @timvandermeij in #18615
- Set the event handlers in the integration tests before any event is triggered by @calixteman in #18617
- [Editor] Move setting
window.uiManager
back to the test code by @timvandermeij in #18623 - Fix the "must check that a value is correctly updated on a field and its siblings" scripting integration test by @timvandermeij in #18624
- Use standard glyph mapping for non-embedded and non-composite Calibri fonts (issue 18208) by @Snuffleupagus in #18628
- Send fetch requests for all page dict lookups in parallel by @richard-smith-p...
v4.5.136
This release contains improvements for the annotation editor, font rendering, image rendering and the viewer.
Changes since v4.4.168
- Bump the stable version in
pdfjs.config
by @timvandermeij in #18359 - [Editor] Take into account the page translation when computing the quadpoints when saving an highlight by @calixteman in #18361
- [api-minor][Editor] When switching to editing mode, redraw pages containing editable annotations (bug 1883884) by @calixteman in #18134
- Bump library version to 4.5 by @calixteman in #18365
- [Editor] Make sure everything is cleaned up when we switch to annotation editor mode by @calixteman in #18366
- [api-minor] Remove the deprecated
renderTextLayer
andupdateTextLayer
functions (PR 18104 follow-up) by @Snuffleupagus in #18349 - Use vertical variant of a char when it's in a missing vertical font (bug 1905623) by @calixteman in #18369
- [Firefox] Generate a PDF.js default-prefs file that can be used directly in mozilla-central (bug 1905864) by @Snuffleupagus in #15209
- Update dependencies and translations to the most recent versions by @timvandermeij in #18367
- Make sure the editor is visible before getting its rect by @calixteman in #18374
- Fix the integration tests related to printing by @calixteman in #18383
- [Editor] Remove the option enableStamp by @calixteman in #18389
- Move the internal API/Worker
isEditing
-state intoRenderingIntentFlag
by @Snuffleupagus in #18387 - Remove the
renderForms
parameter from the AnnotationgetOperatorList
methods by @Snuffleupagus in #18394 - Check the relevant parameters inside of the
mustBeViewedWhenEditing
method by @Snuffleupagus in #18393 - [Editor] Avoid to query ML engine several times for the same image by @calixteman in #18380
- Allow to change the toolbar height when changing the pref toolbar.density in Firefox (bug 1171799) by @calixteman in #18397
- Fix the "must check that charLimit is correctly set" scripting integration test by @timvandermeij in #18399
- [Editor] Change the enableML pref for enableAltText (bug 1905923) by @calixteman in #18398
- Fix orphaned browser processes due to uncaught exceptions in the tests by @timvandermeij in #18401
- Move the "updatedPreference" event listener registration by @Snuffleupagus in #18402
- Fix the "caches image resources at the document/page level as expected (issue 11878)" unit test by @timvandermeij in #18404
- Handle toUnicode cMaps that omit leading zeros in hex encoded UTF-16 (issue 18099) by @alexcat3 in #18390
- Introduce a
waitForScripting
helper function and use it in all scripting integration tests by @timvandermeij in #18405 - Use BiDi protocol for Chrome tests by @calixteman in #17962
- Re-factor
BasePreferences
to essentially be a wrapper aroundAppOptions
by @Snuffleupagus in #18413 - [Editor] Wait for 'pagerendered' to switch to editing mode by @calixteman in #18418
- Fix
ensureMinFontSizeComputed
calculation if<body>
is a flex container by @razh in #18416 - Allow e.g. /FitH destinations without additional parameter (bug 1907000) by @Snuffleupagus in #18421
- Also update the width/unicode data when replacing missing glyphs in non-embedded Type1 fonts (issue 18059) by @Snuffleupagus in #18412
- [Editor] Update the freetext annotation dictionary instead of creating a new one when updating an existing freetext by @calixteman in #18419
- Create absolute filter-URLs when needed in
DOMFilterFactory
(issue 18406) by @Snuffleupagus in #18417 - Remove the remaining
zoomDisabledTimeout
usage (issue 17727) by @Snuffleupagus in #18423 - [Editor] Make editor toolbars usable whatever their z-index (bug 1879104) by @calixteman in #18425
- [Editor] Disable existing highlights when drawing a new one (bug 1879035) by @calixteman in #18424
- Update dependencies to the most recent versions and update the JS/CSS files for the new Prettier/Stylelint versions by @timvandermeij in #18432
- Disable network connections to Contile for the tests by @timvandermeij in #18433
- Remove obsolete
pdfjs-dist
code from the Gulpfile by @timvandermeij in #18434 - [Editor] Add an option to use the new 'add an image' flow (bug 1907207) by @calixteman in #18429
- Fix
DOMFilterFactory.#createUrl
in MOZCENTRAL builds (18417 PR follow-up) by @Snuffleupagus in #18430 - [Editor] When in non-editing mode, add a new editor only once the editing mode has switched by @calixteman in #18440
- [api-minor] Remove
Outliner
from the official API by @Snuffleupagus in #18441 - Remove active smask when restoring the initial canvas state by @calixteman in #18445
- Add the possibility to change some pdfjs preferences from the viewer (bug 1908483) by @calixteman in #18449
- Allow /XYZ destinations without zoom parameter (issue 18408) by @Snuffleupagus in #18453
- Include additional data when fetching browser preferences in the PDF Viewer (bug 1908401) by @Snuffleupagus in #18448
- [Editor] Allow to change a preference from the editor UI manager by @calixteman in #18454
- Load the image-to-text model when opening the pdf viewer in Firefox (bug 1908938) by @calixteman in #18461
- Reduce a tiny bit of duplication in
PDFViewerApplication.setTitleUsingUrl
by @Snuffleupagus in #18464 - Re-factor the code to remove all uses of
PDFViewerApplication.downloadComplete
by @Snuffleupagus in #18463 - Add more validation when setting
AppOptions
(PR 18413 follow-up) by @Snuffleupagus in #18450 - Move the
Preferences
initialization as early as possible by @Snuffleupagus in #18470 - Introduce some
Map
-usage in the AppOptions by @Snuffleupagus in #18469 - Add a pref containing the url for the sumo page about alt text (bug 1909097) by @calixteman in #18471
- Disable system fonts on Android (issue 18210) by @Snuffleupagus in #18465
- Add the possibility to delete a model (bug 1908939) by @calixteman in #18472
- Fallback on DeviceGray when a colorspace cannot be parsed by @calixteman in #18468
- Remove the unused
AppOptions.remove
method by @Snuffleupagus in #18475 - Use a transparent color when setting fill/stroke colors in a pattern context but with no colorspace by @calixteman in #18467
- Re-factor how the "docBaseUrl" API-option is set in the viewer by @Snuffleupagus in #18476
- Add better support for AppOptions with multiple types (PR 18465 follow-up) by @Snuffleupagus in #18480
- Add a pref to know if the alt-text must be automatically generated (bug 1909310) by @calixteman in #18484
- Remove the
streamqueue
dependency by @timvandermeij in #18483 - Replace the GENERIC-only "locale" with "localeProperties" in AppOptions by @Snuffleupagus in #18486
- [Editor] Correctly save a non-ascii alt text by @calixteman in #18493
- Consistently dispatch events, if needed, when setting AppOptions by @Snuffleupagus in #18495
v4.4.168
This release contains improvements for annotations, annotation editing, font conversion, image decoding, performance, scripting, text selection, test/release infrastructure and the viewer.
Changes since v4.3.136
- Bump the stable version in
pdfjs.config
by @timvandermeij in #18182 - Update dependencies and translations to the most recent versions by @timvandermeij in #18183
- [api-minor] Simplify how the list of points are structured by @calixteman in #18163
- Bump library version to 4.4 by @calixteman in #18192
- Disconnect the resize observer and remove scroll listener when unbinding window events by @calixteman in #18193
- Switch to page-scrolling mode when the pdf has more than 10000 pages (bug 1895050) by @calixteman in #18189
- Upgrade
gulp
to version 5.0.0 by @timvandermeij in #18197 - Decompress when it's possible images in using DecompressionStream by @calixteman in #18167
- Fix decoding of JPX images having an alpha channel by @calixteman in #18204
- Change openjpeg.js license from Apache 2 to BSD 2-clause by @calixteman in #18205
- Change
DownloadManager.download
to use Uint8Array-data by @Snuffleupagus in #18216 - Inline the
#finishRendering
helper inTextLayerBuilder.prototype.render
by @Snuffleupagus in #18217 - [Editor] Support dragging & dropping images on a pdf (bug 1900907) by @calixteman in #18214
- Update our OpenJPEG decoder in order to fix a malloc failure due to big image (bug 1901253) by @calixteman in #18219
- Don't display annotations with a PMD (barcode stuff) entry (bug 1899804) by @calixteman in #18228
- Update dependencies and translations to the most recent versions by @timvandermeij in #18231
- Add an option to enable/disable hardware acceleration (bug 1902012) by @calixteman in #18238
- Remove the
DownloadManager.downloadUrl
method by @Snuffleupagus in #18236 - Display a wait cursor when saving by @calixteman in #18243
- Fix an query with an empty selector in integration tests by @calixteman in #18246
- Improve how the wait-cursor is toggled when copying all text by @Snuffleupagus in #18244
- Improve date parsing in the js sandbox by @calixteman in #18234
- Don't recommend installing
gulp-cli
globally in the README and on the website by @timvandermeij in #18247 - Replace Wintersmith with Metalsmith by @timvandermeij in #18248
- Include the generated API documentation directly on the API page by @timvandermeij in #18251
- Improve some old code in the
src/display/api.js
file by @Snuffleupagus in #18250 - Compute correctly the unitsPerEm value from the fontMatrix when converting a font (bug 1539074) by @calixteman in #18253
- Implement reproducibility for the JSDoc builds by @timvandermeij in #18256
- Ensure that saving, in the viewer, works for partially loaded documents by @Snuffleupagus in #18254
- Implement reproducibility for the release builds by @timvandermeij in #18258
- Update jpx decoder by @calixteman in #18257
- Only disable HWA in m-c build and for local dev by @calixteman in #18255
- Only use the l10n fallback bundle when normal ftl-file fetching failed (issue 18264) by @Snuffleupagus in #18270
- Ensure that dependencies are added to the operatorList for locally cached images (issue 18259) by @Snuffleupagus in #18269
- Clean up before closing the tab in integration tests by @calixteman in #18271
- Add a helper function for handling locally cached image data (PR 18269 follow-up) by @Snuffleupagus in #18273
- [Editor] Set the canvas in the stamp editor at the right position in odd spread mode by @calixteman in #18275
- [Editor] Fix intermittent failure in integration test when highlighting with the keyboard by @calixteman in #18277
- Enable dumpio when running the tests in order to have some useful debug data by @calixteman in #18260
- Don't save modified documents, when running tests, upon closing the viewer (issue 18274) by @Snuffleupagus in #18282
- Pause l10n (i.e. disconnect the mutation observer in fluent) when closing the viewer by @calixteman in #18280
- Avoid to call a function in the js sandbox when it has been destroyed by @calixteman in #18286
- [Editor] Remove the various listeners when destroying the editor manager by @calixteman in #18284
- Update dependencies to the most recent versions and upgrade
eslint-plugin-unicorn
to version 54.0.0 by @timvandermeij in #18278 - Update the regular expression in
tweakWebpackOutput
to support minified-legacy builds (issue 18290) by @Snuffleupagus in #18292 - Add a new helper, in the viewer, to close everything during testing by @Snuffleupagus in #18289
- Respect
maxCanvasPixels
when computing canvas dimensions by @nicolo-ribaudo in #18218 - [Editor] Don't create an observer for the stamp annotation after the viewer has been closed by @calixteman in #18301
- Don't throw if there's not enough data to get the header in
FlateStream
(issue 18298) by @Snuffleupagus in #18304 - [Editor] Correctly set the accessibility data when copying & pasting a stamp with an alt text (bug 1903589) by @calixteman in #18296
- Close
PDFFindBar
when closing the viewer during testing by @Snuffleupagus in #18302 - Always use DW if it's a number for the font default width (bug 1903731) by @calixteman in #18306
- Use the new formatted issue templates by @nicolo-ribaudo in #18308
- Expose entireWord in updateFindControlState by @bootleq in #18303
- Update dependencies and translations to the most recent versions by @timvandermeij in #18312
- Try to shutdown Fluent "more" when closing the viewer during testing by @Snuffleupagus in #18313
- Disable system addon updates for Firefox in testing mode by @timvandermeij in #18316
- Close the page in the text layer caret selection integration test by @timvandermeij in #18317
- Fix the "copy/paste from a tab to an other" stamp editor integration test by @timvandermeij in #18320
- Don't ignore errors in the Jasmine suite start/end stages by @timvandermeij in #18321
- Include a security policy for PDF.js by @timvandermeij in #18311
- Improve the security policy by @timvandermeij in #18323
- Fix the computation of unitsPerEm when the fontMatrix has some negative coefficients by @calixteman in #18324
- Fix the timeout logic in the
waitForEvent
integration test helper function by @timvandermeij in #18325 - Use
waitForEvent
in thepasteFromClipboard
integration test helper function by @timvandermeij in #18326 - Override the minimum font size when rendering the text layer by @nicolo-ribaudo in #18283
- Remove the
requestAnimationFrame
work-around inL10n.prototype.destroy
(PR 18313 follow-up) by @Snuffleupagus in #18333 - Add the possibility to dispatch some pdf.js events at the chrome level (bug 1904585) by @calixteman in #18332
- Refactor the copy/paste logic in the integration tests and fix a race condition involving the
waitForEvent
integration test helper function by @timvandermeij in #18331 - Cancel the
requestAnimationFrame
in thewatchScroll
helper (PR 18193 follow-up) by @Snuffleupagus in #18335 - Cancel the
requestAnimationFrame
in the API when cancelling rendering by @Snuffleupagus in #18336 - Add a port option to gulp server by @calixteman in #18339
- Fix intermittent failures with freetext and...
v4.3.136
This release contains improvements for performance, image rendering, text selection, annotation editing, accessibility, handling of corrupted documents, integration with third-party frameworks (see #17245) and the viewer.
Changes since v4.2.67
- Bump the stable version in
pdfjs.config
by @timvandermeij in #18023 - Update dependencies and translations to the most recent versions by @timvandermeij in #18024
- Fix rendering problem when zooming on Safari by @Aditi-1400 in #18019
- [api-minor] Remove the use of (get/put)ImageData when drawing SMasks (bug 1874013) by @calixteman in #18029
- [api-minor] Expose the /Desc-attribute of file attachments in the viewer (issue 18030) by @Snuffleupagus in #18031
- Remove the limit used to decided if a group canvas must be upscaled or not by @calixteman in #18035
- Bump library version to
4.3
by @Snuffleupagus in #18033 - Add even more validation of width-data (PR 18017 follow-up) by @Snuffleupagus in #18037
- [api-minor] Improve the
FileSpec
implementation by @Snuffleupagus in #18034 - Pin GitHub actions to Node.js 21 by @nicolo-ribaudo in #18009
- Avoid to aria-hide the structure tree (bug 1894849) by @calixteman in #18044
- Remove most
waitForTimeout
usage from the freetext editor integration tests by @timvandermeij in #18041 - Validate even more dictionary properties by @Snuffleupagus in #18026
- Remove event listeners with
signal
in web/pdf_viewer.js by @Snuffleupagus in #18055 - Remove the unused
Font.prototype.spaceWidth
getter (PR 13424 follow-up) by @Snuffleupagus in #18069 - Revert "Fix rendering problem when zooming on Safari" for causing bug 1895909 by @Snuffleupagus in #18079
- Slightly re-factor how the viewer initializes debug-only functionality by @Snuffleupagus in #18061
- Remove the
ignoreErrors
option from theFontFaceObject
class by @Snuffleupagus in #18066 - [api-minor] Re-factor how Node.js packages/polyfills are loaded (issue 17245) by @Snuffleupagus in #18051
- Restore broken functionality and simplify the implementation in
src/display/text_layer.js
by @Snuffleupagus in #18052 - Update the Babel plugin to remove empty class constructors by @nicolo-ribaudo in #18060
- [api-minor] Include the document /Lang attribute in the textContent-data by @Snuffleupagus in #17941
- [Editor] Fix the CSS properties of the canvas when it's used in a stampEditor (bug 1895909) by @calixteman in #18080
- Fix flickering on text selection by @nicolo-ribaudo in #17923
- Improve the
TextLayerRenderTask
implementation by @Snuffleupagus in #18089 - Update openjpeg build (bug 1896577) by @calixteman in #18087
- Update dependencies and translations to the most recent versions by @timvandermeij in #18092
- Inline the
_fetchDocument
helper function ingetDocument
by @Snuffleupagus in #18091 - Implement a unit test for the
BaseException
class by @timvandermeij in #18093 - Remove unnecessary
signal
parameter fromremoveEventListener
calls by @Snuffleupagus in #18094 - Avoid re-parsing global images that failed decoding (issue 18042, PR 17428 follow-up) by @Snuffleupagus in #18047
- Actually disable
TextLayerRenderTask.prototype.#processItems
whenMAX_TEXT_DIVS_TO_RENDER
is reached (PR 18089 follow-up) by @Snuffleupagus in #18103 - [api-minor] Respect the
drawingDelay
also when CSS-only zooming is used (issue 18022) by @Snuffleupagus in #18077 - Remove the
rimraf
dependency in favor of the built-in Node.jsfs.rmSync
by @timvandermeij in #18106 - Remove the obsolete
needle
dependency by @timvandermeij in #18107 - Don't invoke
cleanupTextLayer
when there are pending textLayers by @Snuffleupagus in #18109 - Support charCodes larger than 32-bit in
adjustMapping
(issue 18117) by @Snuffleupagus in #18119 - Freeze
evaluatorOptions
in the src/core/pdf_manager.js file by @Snuffleupagus in #18115 - [api-minor] Re-factor the basic textLayer-functionality by @Snuffleupagus in #18104
- Remove the
through2
dependency in favor of the built-in Node.jsstream.Transform
by @timvandermeij in #18113 - Update puppeteer to 22.9.0 by @calixteman in #18121
- Support corrupt PDF documents that contain "endsteam" commands (issue 18122) by @Snuffleupagus in #18125
- [Editor] Update popup position and contents after a FreeText has been edited by @calixteman in #17968
- [Editor] Pass a buffer instead of a blob url to the ML api by @calixteman in #18136
- Add test for drawing delay with CSS-only zoom by @nicolo-ribaudo in #18129
- Remove most
waitForTimeout
usage from the scripting integration tests by @timvandermeij in #17974 - Add language attribute to canvas by @Aditi-1400 in #17770
- Improve /Page validation for linearized documents (issue 18138) by @Snuffleupagus in #18143
- Remove the
merge-stream
dependency in favor of theordered-read-streams
dependency by @timvandermeij in #18145 - Shorten the code in the
web/text_layer_builder.js
file by @Snuffleupagus in #18152 - Update dependencies and translations to the most recent versions by @timvandermeij in #18153
- Introduce a
getRect
utility function for the integration tests by @timvandermeij in #18154 - [GeckoView] Don't use the system fonts (bug 1882613) by @calixteman in #18156
- Prevent XRef errors from breaking font loading (bug 1898802) by @Snuffleupagus in #18166
- Update the "File Layout Overview" docs by @Snuffleupagus in #18160
- Improve the
loadingParams
functionality in the API by @Snuffleupagus in #18159 - Simplify the integration test in adding a function to turn on/off an editing tool by @calixteman in #18165
- Move the dialog css stuff in its own file by @calixteman in #18174
- Target ES2022 when building the TypeScript definitions (issue 17932) by @Snuffleupagus in #18161
- Slightly shorten some worker-thread code by @Snuffleupagus in #18169
- Don't register a pending
TextLayer
untilrender
is invoked (PR 18104 follow-up) by @Snuffleupagus in #18171 - [api-minor] Remove the
setTextContentSource
method inTextLayerBuilder
(PR 18104 follow-up) by @Snuffleupagus in #18170 - [api-minor] Simplify API to implement zoom in custom viewers by @nicolo-ribaudo in #18179
v4.2.67
This release includes a new JPX decoder, based on OpenJPEG, which improves JPX image rendering performance and correctness. Moreover, this release contains improvements for the annotation editor, font conversion and the viewer.
Note that text selection boxes for some PDF files may overlap visually. This is a known issue that we currently track in #17561.
Changes since v4.1.392
- Bump the stable version in
pdfjs.config
by @timvandermeij in #17924 - Convert the history code to use proper private methods by @timvandermeij in #17925
- Update dependencies and translations to the most recent versions by @timvandermeij in #17927
- Remove the tag for missing font subset when trying to find a substitution by @calixteman in #17930
- Fix resetting of cursor-tools when closing the document (PR 17464 follow-up) by @Snuffleupagus in #17933
- Warn when a non-embedded font has an invalid name by @calixteman in #17934
- Remove the
mkdirp
dependency in favor of the built-in Node.jsfs.mkdirSync
by @timvandermeij in #17935 - Improve type definitions for the viewer by @ex37 in #17879
- Fix the "must check that invisible fields are made visible" scripting integration test by @timvandermeij in #17940
- Remove the
rimraf
dependency in favor of the built-in Node.jsfs.rmSync
in the test folder by @timvandermeij in #17938 - [api-minor] Update the minimum supported Safari version to 16.4 by @Snuffleupagus in #17942
- Fix the "must check that a field has the correct value when a choice is changed" scripting integration test by @timvandermeij in #17947
- [api-minor] Add a jpx decoder based on OpenJPEG 2.5.2 by @calixteman in #17946
- Bump library version to
4.2
by @Snuffleupagus in #17949 - Build the openjpeg-based decoder in a web environment in order to avoid issues when used in node by @calixteman in #17954
- Fix
JpxImage
API issues (PR 17946 follow-up) by @timvandermeij in #17951 - [JPX] Throw an exception with the error messages returned by openjpeg by @calixteman in #17956
- [Editor] Provide an element to render in the annotation layer after a freetext has been edited (bug 1890535) by @calixteman in #17914
- Remove
waitForTimeout
usage from the helper functions by @timvandermeij in #17966 - Remove some event listeners with
signal
in the viewer by @Snuffleupagus in #17964 - [Editor] Don't show the context menu when resizing by @calixteman in #17973
- Correctly update the xref table when an annotation is deleted by @calixteman in #17970
- Update dependencies and translations to the most recent versions by @timvandermeij in #17972
- Improve jpx decoding by around 20% in enabling simd support when compiling OpenJPEG by @calixteman in #17983
- [api-minor] Remove the image-related error message prefixes by @Snuffleupagus in #17979
- Use the pdf.js warn when using jpx decoder by @calixteman in #17985
- Extend the globally cached image main-thread copying to "complex" images as well (PR 17428 follow-up) by @Snuffleupagus in #17978
- Update
JpxImage.parseImageProperties
to support TypedArray data in IMAGE_DECODERS builds by @Snuffleupagus in #17977 - Add
signal
-support in theEventBus
, and utilize it in the viewer (PR 17964 follow-up) by @Snuffleupagus in #17967 - Set correctly the change property for the event triggered when a choice list is changed by @calixteman in #17999
- Remove all
waitForTimeout
usage from the annotation integration tests by @timvandermeij in #17969 - Validate explicit destinations on the worker-thread to prevent
DataCloneError
(issue 17981) by @Snuffleupagus in #17984 - Allow to insert several annotations under the same parent in the structure tree by @calixteman in #17986
- Always enable smoothing when rendering downscaled image by @calixteman in #17868
- Simplify the way to pass the glyph drawing instructions from the worker to the main thread by @calixteman in #18015
- Validate additional font-dictionary properties by @Snuffleupagus in #18014
- Add more validation of width-data by @Snuffleupagus in #18017
- Reduce code-duplication when caching data in
CompiledFont.getPathJs
by @Snuffleupagus in #18018 - Re-factor
SimpleLinkService
to extendPDFLinkService
by @Snuffleupagus in #18013 - [api-minor] Move the page reference/number caching into the API by @Snuffleupagus in #18001
v4.1.392
This release features improvements, bugfixes and optimizations for accessibility, annotation rendering, annotation editing, font rendering, form handling, image rendering, text selection and the viewer.
Note that text selection boxes for some PDF files may overlap visually. This is a known issue that we currently track in #17561.
Changes since v4.0.379
- Bump the stable version in
pdfjs.config
by @timvandermeij in #17474 - [Editor] Take into account the crop box when saving/printing some highlighted text (bug 1872721) by @calixteman in #17475
- Update Puppeteer to version 21.7.0 by @calixteman in #17477
- Avoid to have the text layer mismatching the rendered text with mismatching locales (bug 1869001) by @calixteman in #17476
- Preserve the whitespaces when getting text from FreeText annotations (bug 1871353) by @calixteman in #17458
- [Editor] Init the default highlight color before creating the first editor instance by @calixteman in #17481
- Update packages and translations by @Snuffleupagus in #17482
- Remove terminal white spaces when extracting text from annotation appearances by @calixteman in #17487
- Bump follow-redirects from 1.15.3 to 1.15.4 by @dependabot in #17494
- [Editor] Don't throw when changing the color of an invisible highlight by @calixteman in #17498
- [Editor] Move the code to generate the SVG path from draw_layer.js to outliner.js by @calixteman in #17499
- [Editor] Correctly serialize highlight data (regression from #17499) by @calixteman in #17501
- [api-minor] Validate the
workerPort
/workerSrc
options by @Snuffleupagus in #17504 - Add note about running
npm install
on MacOS by @nicolo-ribaudo in #17490 - Bump library version to
4.1
by @Snuffleupagus in #17507 - Update
gulp-cli
to 2.3.0 and explicitly add it as a dependency by @nicolo-ribaudo in #17489 - Consistently remove the "visibilitychange" listener in
PDFViewer
(PR 14388 follow-up) by @Snuffleupagus in #17508 - Update l10n files by @calixteman in #17513
- [Editor] Extract all the lines when adding a FreeText annotation by @calixteman in #17511
- Take into account empty lines when extracting text content from the appearance by @calixteman in #17512
- [Editor] Draw a line instead of a Bezier curve when an Ink has only one point by @calixteman in #17514
- [Editor] Slightly simplify the serialization of an highlight annotation by @calixteman in #17517
- [Editor] Make editors draggable with touchscreens by @calixteman in #17519
- Add the font Linux Libertine as a possible substitution for Times New Roman by @calixteman in #17405
- Format json files in using prettier by @calixteman in #17525
- [Editor] Avoid an exception when pressing space key to change the color of an highlight by @calixteman in #17527
- Exclude the
web/locale/
folder from linting (PR 17525 follow-up) by @Snuffleupagus in #17529 - [Editor] Avoid to move a non-draggable editor with the keyboard by @calixteman in #17528
- [Editor] Add the ability to make a free highlight (i.e. without having to select some text) (bug 1856218) by @calixteman in #17506
- [Editor] Change the arrow direction when the dropdown is visible in the color picker (bug 1875357) by @calixteman in #17534
- Make the caret visible in the text layer in caret browsing mode by @calixteman in #17533
- [Editor] Add support for printing/saving free highlight annotations by @calixteman in #17531
- Remove the
isArrayBuffer
helper function by @Snuffleupagus in #17537 - Update packages and translations by @Snuffleupagus in #17544
- Ignore auto-formatting patches in
git blame
by @Snuffleupagus in #17546 - Remove DNS resolver workaround from the test framework by @timvandermeij in #17547
- [Editor] Unselect highlights when the user click on the text layer (bug 1869767) by @calixteman in #17543
- Use the original value of a field when propagating event (fixes #17540) by @calixteman in #17541
- [Editor] Don't add the keyboard listener on the color-picker each time the dropdown menu is shown by @calixteman in #17539
- Avoid to have focused tests in using eslint-plugin-jasmine by @calixteman in #17548
- Use shorter arrow functions where possible by @Snuffleupagus in #17550
- Add more
async
code when loading fonts in thePartialEvaluator
by @Snuffleupagus in #17553 - Don't ignore
test.mjs
child process exit codes in the Gulpfile by @timvandermeij in #17555 - Ensure that
EvaluatorPreprocessor.opMap
has a null-prototype (issue 17554) by @Snuffleupagus in #17556 - Print correctly documents containing chars with an unicode greater than 0xFFFF (bug 1669097) by @calixteman in #17558
- Add more
async
code in thePartialEvaluator
by @Snuffleupagus in #17562 - Replace the webpack+acorn transform with a Babel plugin by @nicolo-ribaudo in #17563
- [Editor] Update the parameters in the UI of the last selected editor when undoing/redoing by @calixteman in #17564
- [Editor] Add the possibility to change the thickness of a free highlight (bug 1876096) by @calixteman in #17568
- Fix unreferenced CSS variables (PR 17533 follow-up) by @Snuffleupagus in #17578
- Reduce memory use and improve perfs when computing the bounding box of a bezier curve (bug 1875547) by @calixteman in #17574
- [Editor] Change the icon to add a FreeText annotation (bug 1876564) by @calixteman in #17580
- Fix the textLayer-opacity when using the FontInspector (PR 17533 follow-up) by @Snuffleupagus in #17587
- [Editor] Change the cursors for highlighting (bug 1876588) by @calixteman in #17581
- [Editor] Add a tooltip to the slider to set the thickness of free highlights by @calixteman in #17582
- Re-factor
DefaultExternalServices
into a regular class, without static methods by @Snuffleupagus in #17588 - Update dependencies/translations to the most recent versions by @timvandermeij in #17590
- Re-enable the
should compress and save text
unit-test (issue 17399) by @Snuffleupagus in #17591 - [GENERIC viewer] Generate the
fileInput
DOM-element dynamically by @Snuffleupagus in #17592 - Move the
debuggerSrc
-parameter into theAppOptions
by @Snuffleupagus in #17593 - Fix transform of unary expression in Babel plugin by @nicolo-ribaudo in #17596
- [Editor] Update highlight cursors by @calixteman in #17598
- [Editor] Remove the outline which is inside the free highlight shape by @calixteman in #17586
- [Editor] Fix the position of the free highlight toolbar by @calixteman in #17602
- Ensure that
GenericL10n
works if the locale files cannot be loaded by @Snuffleupagus in #17603 - Initialize the
ExternalServices
-instance lazily in the viewer (PR 17588 follow-up) by @Snuffleupagus in #17604 - Change file permissions for newly added cursors by @calixteman in #17605
- Make downloadManager optional in AnnotationLayerParameters by @wojtekmaj in #17608
- Point the development mode fallback locale-path to the
l10n
-folder (issue 17609, PR 17603 follow-up) by @Snuffleupagus in #17610 - Use a limit, in more places, when splitting strings by @Snuffleupagus in #17619
- Simplify the signature of the
PDFDataTransportStream
constructor by @Snuffleupagus in #17620 - Implement caret browsing mode (bug 807730) by @calixteman in #17611
- [Editor] Set the right color to s...
v4.0.379
This release mainly contains improvements and bugfixes for the annotation editor functionality.
Changes since v4.0.269
- Bump the stable version in
pdfjs.config
by @timvandermeij in #17339 - Don't throw when there isn't enough data to get block info in flate stream by @calixteman in #17340
- [Editor] Avoid to add a new ink editor when we aren't editing anymore by @calixteman in #17344
- [Editor] Add a new editor to highlight some text in a pdf (bug 1866119) by @calixteman in #17317
- [Editor] Move the alt text button in the editor toolbar by @calixteman in #17329
- [Firefox] Remove the
FirefoxCom.requestSync
method by @Snuffleupagus in #17338 - [Editor] Fix subtype for telemetry data (follow-up of #17329) by @calixteman in #17351
- [Editor] Fix the colors in HCM when hovering a button in the editor toolbar by @calixteman in #17352
- Use "count" and not "clickCount" when calling page.mouse.click() by @whimboo in #17358
- Remove the "transitionend" event listener from the default viewer (issue 17347) by @Snuffleupagus in #17360
- [Firefox] Restore opening of PDF attachments (issue 17353, bug 1867764) by @Snuffleupagus in #17363
- [Editor] Disable mouse events when leaving the highlight mode by @calixteman in #17364
- fuzz: initial integration by @manunio in #17337
- Modernize the
calculateMD5
andverifyManifestFiles
test helper functions by @timvandermeij in #17367 - [Editor] Make sure that all layers are disabled when an editing session is done by @calixteman in #17370
- [Editor] Always give the focus to the ink editor when starting drawing (bug 1867588) by @calixteman in #17375
- [Editor] Avoid conflicts between new persistent refs and the ones created when saving (bug 1865341) by @calixteman in #17374
- Remove the unused
--editor-toolbar-active-bg-color
CSS variable (PR 17352 follow-up) by @Snuffleupagus in #17377 - [Editor] Don't remove elements from the draw layer after it has been destroyed by @calixteman in #17380
- [Editor] Highlight must keep selected after the document has been scrolled by @calixteman in #17381
- Set text field value as a string when it's for a date or a time (bug 1868503) by @calixteman in #17385
- [Editor] Add a color picker with predefined colors for highlighting text (bug 1866434) by @calixteman in #17359
- Remove focus from the toggleButton when closing the sidebar with a mouse (issue 17361) by @Snuffleupagus in #17386
- [Editor] Avoid to have a color picker for highlighting twice in the main toolbar by @calixteman in #17388
- Use page.evaluateHandle when we want to await on document promises in integration tests by @calixteman in #17387
- Update Puppeteer to version 21.6.0 and force "CDP" protocol by @whimboo in #17393
- Switch Puppeteer tests from CDP to WebDriver BiDi by @whimboo in #17172
- Limit the amount of console "spam" during fuzz tests (PR 17337 follow-up) by @Snuffleupagus in #17372
- Collect a few non-MOZCENTRAL
AppOptions
default values together by @Snuffleupagus in #17391 - Support Annotations with corrupt /BS-entries by @Snuffleupagus in #17395
- Re-factor how the
sandboxBundleSrc
option is passed toPDFScriptingManager
by @Snuffleupagus in #17397 - Don't run beforeunload callback when closing page in integration tests by @calixteman in #17398
- Set a print listener as soon as possible in the autoprint integration test by @calixteman in #17400
- Bump actions/setup-python from 4 to 5 by @dependabot in #17411
- Bump actions/deploy-pages from 2 to 3 by @dependabot in #17412
- Adds missing button closing tag by @emielmolenaar in #17415
- [Editor] Add some missing strings to localize for highlighting by @calixteman in #17414
- Modernize the code in the
test/downloadutils.mjs
file by @timvandermeij in #17431 - Center radio button checkmark by @jdanyow in #17429
- Bump actions/upload-artifact from 3 to 4 by @dependabot in #17435
- Bump github/codeql-action from 2 to 3 by @dependabot in #17434
- Revert "Bump actions/upload-artifact from 3 to 4" by @Snuffleupagus in #17436
- Prevent errors in
AnnotationEditorUIManager.destroy
if thealtTextManager
is undefined by @pulsejet in #17445 - Toggle the visibility of the
outlineOptionsContainer
, in the sidebar, using only CSS by @Snuffleupagus in #17441 - Attempt to further reduce re-parsing for globally cached images (PR 11912, 16108 follow-up) by @Snuffleupagus in #17428
- Update packages and translations by @Snuffleupagus in #17456
- Bump actions/upload-artifact from 3 to 4 by @dependabot in #17460
- Bump actions/deploy-pages from 3 to 4 by @dependabot in #17461
- Remove the internal "toolbarreset"/"secondarytoolbarreset" events and slightly re-factor the code by @Snuffleupagus in #17464
v4.0.269
This release contains improvements for the annotation editor, including a UI for deleting annotations and experimental support for highlight annotations, as well as bugfixes and improvements after feedback on the initial PDF.js 4.0 release.
Changes since v4.0.189
- Bump the stable version in
pdfjs.config
by @timvandermeij in #17226 - Don't try to collect a nonexistent field because of an invalid ref by @calixteman in #17233
- Ensure that
fieldObjects
and#collectFieldObjects
handles References correctly by @Snuffleupagus in #17242 - Don't avoid to execute the Blur callback when blurring a text field (bug 1863910) by @calixteman in #17247
- Remove the "Open file"-button from the main toolbar by @Snuffleupagus in #17244
- [Editor] Add a toolbar to selected editors with a button to delete it (bug 1863763) by @calixteman in #17243
- Fix the maxp table version in font to make it visible on Windows by @calixteman in #17253
- Tweak the background-color of the
editorParamsToolbar
s by @Snuffleupagus in #17256 - Update dependencies and translations to the most recent versions by @timvandermeij in #17260
- Set a type for the
Blob
used increateCDNWrapper
(issue 17259) by @Snuffleupagus in #17265 - Rename *.d.ts to *.d.mts by @tamuratak in #17252
- Ensure that the viewer waits for the library to complete loading (issue 17228) by @Snuffleupagus in #17255
- [Editor] Avoid to click on the delete button in the freetext integration tests by @calixteman in #17264
- Move linting to a separate GitHub Actions workflow by @Snuffleupagus in #17267
- Move
gulp typestest
to a separate GitHub Actions workflow by @Snuffleupagus in #17266 - Clean-up the CI workflow a bit by @Snuffleupagus in #17268
- [GENERIC viewer] Fallback to the short-format of the language code (issue 17269) by @Snuffleupagus in #17270
- Fix typo in the
--hcm-highlight-filter
CSS variable name (issue 17254) by @Snuffleupagus in #17272 - Get the field name from its parent when it doesn't have one when collecting fields (bug 1864136) by @calixteman in #17271
- Introduce a GitHub Actions workflow for running the font tests by @timvandermeij in #17263
- Re-factor the
L10n
-implementations to use lowercase language-codes internally by @Snuffleupagus in #17273 - Re-factor how the
GenericL10n
class fetches localization-data by @Snuffleupagus in #17277 - [Editor] Add a tooltip to the delete button by @calixteman in #17281
- Restore the option to set light/dark mode for chromium and generic builds by @calixteman in #17293
- [Editor] Make the alt-text button large enough to display correctly whatever string by @calixteman in #17300
- Throw a
JpegError
when a JPEG image has no frame data (issue 17302) by @Snuffleupagus in #17303 - [Editor] Add a way to extract the outlines of a union of rectangles by @calixteman in #17291
- Re-factor the loading-icons used in the viewer toolbars by @Snuffleupagus in #17287
- [Editor] Add support for saving/printing a newly added Highlight annotation (bug 1865708) by @calixteman in #17304
- Move the editor-buttons in the main toolbar by @Snuffleupagus in #17294
- Make sure that only one radio button is checked in its group (bug 1864136) by @calixteman in #17318
- [Editor] Only focus the canvas for mouse events when drawing in the canvas by @calixteman in #17330
- Use the
fetchData
helper function in more cases by @Snuffleupagus in #17328 - Fix examples/webpack/README.md. by @tamuratak in #17320
- Remove language codes from text strings. by @calixteman in #17331
- Update dependencies and translations to the most recent versions by @timvandermeij in #17334