github mozilla/pdf.js v2.15.349

latest releases: v4.4.168, v4.3.136, v4.2.67...
24 months ago

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

Changes since v2.14.305:

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

Don't miss a new pdf.js release

NewReleases is sending notifications on new releases.