This release features image rendering improvements that allow rendering big images even if they are larger than the canvas limits, which fixes quite a lot of issues about images that previously failed to render. Moreover, this release contains bugfixes and improvements for annotations, text selection and typing/documentation.
Changes since v3.4.120
- Bump versions in
pdfjs.config
by @timvandermeij in #16093 - Check
OffscreenCanvas
support once on the worker-thread by @Snuffleupagus in #16095 - [api-minor] Move the
canvasFactory
option intogetDocument
by @Snuffleupagus in #16100 - [api-minor] Generate images in the worker instead of the main thread. by @calixteman in #16062
- [api-minor] Remove calling
getDocument
directly with aPDFDataRangeTransport
-instance (PR 15943 follow-up) by @Snuffleupagus in #16103 - Bump minimist from 1.2.5 to 1.2.7 by @dependabot in #16107
- Render large images even if they're larger than the canvas limits (bug 1720282) by @calixteman in #16077
- [Annotation] Don't rotate an annotation when it has the NoRotate flag by @calixteman in #16110
- Revert "Update
rimraf
to version 4" by @Snuffleupagus in #16118 - Use appearance stream to render locked annotations (bug 1723568) by @calixteman in #16121
- Slightly modify the max width of a tracking space by @calixteman in #16124
- [api-minor] Add an option to set the max canvas area by @calixteman in #16125
- Avoid to have a factor too close to 2 when downscaling image by @calixteman in #16117
- [api-minor] Remove the deprecated
onUnsupportedFeature
functionality (PR 15758 follow-up) by @Snuffleupagus in #16122 - Support (rare) Type3 fonts with Pattern resources (issue 16127) by @Snuffleupagus in #16128
- Partially revert PR 15578 by @calixteman in #16131
- Apply transfer filters to any graphic commands by @calixteman in #16115
- Fix search in pdf a containing some UTF-32 characters (bug 1820909) by @calixteman in #16138
- Move the svg definitions in its own div by @calixteman in #16145
- Correct PostScript trigonometric operators by @bungeman in #16096
- [api-minor] Update the minimum supported Node.js version to 16 by @Snuffleupagus in #16123
- Fix the JSDoc
returns
-type for twoPageViewport
-methods (issue 16134) by @Snuffleupagus in #16142 - Include the document-id in the SVG-filter names (PR 16062 follow-up) by @Snuffleupagus in #16141
- Slightly delay cleanup, after rendering, in documents with large images by @Snuffleupagus in #16108
- Update packages and translations by @Snuffleupagus in #16147
- Remove tag from the Firefox built-in viewer (bug 1821408) by @calixteman in #16153
- Miscellaneous small TypeScript fixes by @Snuffleupagus in #16152
- [api-minor] Extend general transfer function support to browsers without
OffscreenCanvas
by @Snuffleupagus in #16151 - Warn about missing/incorrect
--scale-factor
CSS-variable inrenderTextLayer
(issue 16139) by @Snuffleupagus in #16162 - Simplify the
applyTransferMapsToCanvas
method (PR 16151 follow-up) by @Snuffleupagus in #16166 - Clean-up the
PDFViewer.{increaseScale, decreaseScale}
methods by @Snuffleupagus in #16171 - Clean-up the pre-processor statements in
web/viewer.html
by @Snuffleupagus in #16169 - Use
margin-inline
in theweb/pdf_viewer.css
file (PR 14670 follow-up) by @Snuffleupagus in #16172 - [api-minor] Use a SVG filter when rendering pages in HCM by @calixteman in #16075
- Add a helper, in
DOMFilterFactory
, to reduce duplication when creating<feFuncX>
s by @Snuffleupagus in #16180 - Only warn about missing
--scale-factor
CSS-variable for visible textLayers (PR 16162 follow-up) by @Snuffleupagus in #16181 - Fix the
transfer
parameter, forstructuredClone
, in theLoopbackPort
by @Snuffleupagus in #16175 - Use the position of the previous xref stream if any when saving a pdf (bug 1823296) by @calixteman in #16188
- Support multi-byte ToUnicode entries, when using predefined CMaps (issue 16176) by @Snuffleupagus in #16186
- Track previous "XRefStm"s in a
Set
, rather than anObject
by @Snuffleupagus in #16191 - Add even more non-standard ligatures (PR 15517 follow-up) by @Snuffleupagus in #16193
- Introduce
inset
usage in the CSS files by @Snuffleupagus in #16173 - Introduce
inset-block
usage in the viewer CSS by @Snuffleupagus in #16182 - Use cursor:move for draggable texts and drawings (Bug 1804252) by @nchevobbe in #16192
- Use
String.prototype.replaceAll()
where appropriate by @Snuffleupagus in #16196 - Reduce some duplication in the
PDFViewer.{increaseScale, decreaseScale}
methods by @Snuffleupagus in #16198 - Enable the
unicorn/prefer-negative-index
ESLint plugin rule by @Snuffleupagus in #16185 - Use
replaceAll
in therecoverJsURL
helper function by @Snuffleupagus in #16208 - Enable the
declaration-block-no-redundant-longhand-properties
Stylelint rule by @Snuffleupagus in #16207 - Update packages and translations by @Snuffleupagus in #16206
- Slightly reduce the size of the
FontInspector
-integration in the API by @Snuffleupagus in #16199 - Fix spelling of
occurred
in a couple of comments by @Snuffleupagus in #16211 - [GeckoView] Remove unused
transition
CSS-rules by @Snuffleupagus in #16212 - ESMify some modules for m-c (bug 1824610) by @calixteman in #16217
- Simplify the
isPDFFunction
helper function by @Snuffleupagus in #16218 - Reduce duplication in the
validateCSSFont
helper function by @Snuffleupagus in #16213 - Create a new chunk when the char is too rised compared to the previous one by @calixteman in #16223
- Fix various zooming regressions (PR 15812 follow-up) by @Snuffleupagus in #16227
- [Firefox] Set the
imageResourcesPath
correctly (PR 16153 follow-up) by @Snuffleupagus in #16228 - Remove now unnecessary eslint-disable statement generated for PdfJsDefaultPreferences.sys.mjs. (bug 1825522). by @Standard8 in #16235
- [api-minor] Remove the
disableCombineTextItems
option by @Snuffleupagus in #16234 - Update the Node.js compatibility-check in the worker-thread by @Snuffleupagus in #16238
- [Firefox] Stop using a
baseUrl
in thePDFLinkService
(PR 16153 follow-up) by @Snuffleupagus in #16232 - Write some {Object} in api.js more precise by @nmtigor in #16159
- Use object-spread when dispatching events in the toolbars by @Snuffleupagus in #16243
- [api-minor] Remove the
canvasFactory
option fromPDFPageProxy.render
(PR 16100 follow-up) by @Snuffleupagus in #16242