Releases: mozilla/pdf.js
v3.5.141
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
v3.4.120
This release contains bugfixes and optimizations/cleanups, in particular in the areas of annotations/forms, text selection, font conversion, accessibility and performance (reduced browser reflows).
Changes since v3.3.122
- Bump versions in
pdfjs.config
by @timvandermeij in #15974 - Remove the transition when displaying the sidebar when the user prefers reduced motion (bug 1813138) by @calixteman in #15973
- Extend
getGlyphMapForStandardFonts
with additional entries (issue 15977) by @Snuffleupagus in #15979 - Allow, optionally, using worker-modules during local development by @Snuffleupagus in #15984
- [Editor] Make the annotation editor layer invisible when disabled and empty by @calixteman in #15970
- Remove the loading icon div and replace it by a pure css solution using :after. by @calixteman in #15992
- Limit the
singlePageView
CSS rules to only the COMPONENTS build by @Snuffleupagus in #15996 - Remove the
loadingIcon
in all cases when resetting the page (PR 15992 follow-up) by @Snuffleupagus in #15997 - [GeckoView] Remove unused
@media
CSS rules by @Snuffleupagus in #15999 - Limit the
removePageBorders
option, inPDFViewer
, to only GENERIC builds by @Snuffleupagus in #15998 - Remove a couple of manual loops in the
PDFViewerApplication.open
method by @Snuffleupagus in #15991 - [GeckoView] Don't initalize the cursor-tools, since they're unused by @Snuffleupagus in #16001
- Remove the
isEmptyObj
unit-test helper function by @Snuffleupagus in #16005 - Move the
--scale-select-width
CSS variable to the relevant DOM element by @Snuffleupagus in #16003 - [api-minor] Let the
cMapPacked
parameter, ingetDocument
, default totrue
by @Snuffleupagus in #15981 - [api-minor] Update the minimum supported browsers, and remove the PostCSS
logical
plugin by @Snuffleupagus in #15968 - Remove unused parameters from the
onOpenWithTransport
method inPDFViewerApplication.initPassiveLoading
by @Snuffleupagus in #15987 - Improve how we cache Promises in
WorkerTransport
by @Snuffleupagus in #16004 - Miscellaneous small viewer improvements by @Snuffleupagus in #16006
- Re-factor the parameter parsing/validation in
getDocument
by @Snuffleupagus in #16007 - [GeckoView] Avoid unused outline, attachments, and layers fetching by @Snuffleupagus in #16016
- [GeckoView] Reduce the size of the built viewer by @Snuffleupagus in #16009
- [Annotation] Avoid to encrypt the appearance stream two times (bug 1815476) by @calixteman in #16020
- [GeckoView] Skip fetching/parsing of pageLabels by @Snuffleupagus in #16018
- [Annotation] Take into account the stroke alpha for a FreeText without appearance by @calixteman in #16023
- Remove most build-time
require
statements from the viewer (PR 16009 follow-up) by @Snuffleupagus in #16019 - Fix pinch-to-zoom on mac for the Firefox builtin viewer by @calixteman in #16026
- Avoid a useless animation when the spinner is invisible by @calixteman in #16025
- Hide the struct tree layer during zooming by @calixteman in #16017
- Change the
LoopbackPort
class to use a Set internally by @Snuffleupagus in #16030 - [Annotation] For choice widget, use the I entry instead of the V one (bug 1770750) by @calixteman in #16031
- Ignore position of combining diacritics when getting text (bug 1640217) by @calixteman in #16033
- Reduce usage of the
arrayByteLength
helper function by @Snuffleupagus in #16032 - [Annotation] A combo can have a value other than one in the options by @calixteman in #16035
- Ensure that "GetAnnotations" errors are propagated to the main-thread (PR 15267 follow-up) by @Snuffleupagus in #16042
- Update packages and translations by @Snuffleupagus in #16046
- Update Stylelint to version 15 by @Snuffleupagus in #16048
- Improve the consistency between the
LocalPdfManager
/NetworkPdfManager
constructor by @Snuffleupagus in #16047 - Slightly re-factor preferences/options initialization in the viewer by @Snuffleupagus in #16045
- Move
rewriteUrlClosure
into theweb/chromecom.js
file by @Snuffleupagus in #16028 - Remove inline opening of PDF attachments in the COMPONENTS build by @Snuffleupagus in #16013
- Re-factor the
arraysToBytes
helper function (PR 16032 follow-up) by @Snuffleupagus in #16040 - Remove the unused
eventBus
option inPDFThumbnailViewer
(PR 15215 follow-up) by @Snuffleupagus in #16051 - Reduce duplication for reference tests with an
annotationStorage
entry by @Snuffleupagus in #16053 - Don't replace an eol by a whitespace when the last char is a Katakana-Hiragana diacritic by @calixteman in #16065
- A little clean-up of the
getDocument
call intest/driver.js
by @Snuffleupagus in #16054 - [api-minor] Deprecate providing binary data as
Buffer
in Node.js environments by @Snuffleupagus in #16055 - Don't try to place the
xfaLayer
"on top" in regular PDF documents by @Snuffleupagus in #16056 - [JS] Send a Validate action on change on Choice widget by @calixteman in #16071
- Move the
ImageBitmap
clean-up into thePDFObjects
class by @Snuffleupagus in #16079 - [a11y] Improve the visibility of link annotations in HCM by @calixteman in #16080
- [Acroform] Use the full path to find the node in the XFA datasets where to store the value by @calixteman in #16082
- Use
OffscreenCanvas
as intended for all code-paths insrc/display/text_layer.js
(PR 15722 follow-up) by @Snuffleupagus in #16086
v3.3.122
This release contains a new pinch to zoom feature for the viewer and other bugfixes and optimizations/cleanups, in particular some that reduce browser reflow and memory usage which improves performance.
Changes since v3.2.146
- Bump versions in
pdfjs.config
by @timvandermeij in #15878 - Avoid an infinite loop when searching for a single diacritic by @calixteman in #15883
- Enable the
defaultZoomDelay
option/preference unconditionally, and other (small) improvements by @Snuffleupagus in #15884 - [api-minor] Remove the
PDFDocumentProxy.stats
getter (PR 15758 follow-up) by @Snuffleupagus in #15880 - Update the
type
/subtype
at the end of font parsing by @Snuffleupagus in #15885 - [api-minor] Add the pinch-to-zoom feature (bug 1677933) by @calixteman in #15886
- Reduce duplication in the
accumulateWheelTicks
/accumulateTouchTicks
methods (PR 15886 follow-up) by @Snuffleupagus in #15891 - [JS] UserActivation must be enabled before running document actions by @calixteman in #15892
- [GV] Remove print stuff because window.print isn't implemented (bug 1808668) by @calixteman in #15894
- [GV] Add an option in the find controller to update matches count only when the last page is reached (bug 1803188). by @calixteman in #15896
- Delay the loading icon display by @calixteman in #15857
- [api-minor] Improve the
useWorkerFetch
default value checks by @Snuffleupagus in #15879 - Inline the
setPDFNetworkStreamFactory
functionality insrc/display/api.js
by @Snuffleupagus in #15887 - Remove shadow around each pages (fix issue #15836) by @calixteman in #15850
- Tweak the
--toolbar-border-color
CSS variable (PR 15850 follow-up) by @Snuffleupagus in #15899 - Set ExpansionFactor to 0.06 when it's equals to 0 in the private dict of CFF fonts by @calixteman in #15900
- Support parsing encrypted documents in
XRef.indexObjects
(issue 15893) by @Snuffleupagus in #15897 - Avoid null ExpansionFactor in type1 fonts (follow-up of #15289) by @calixteman in #15901
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot in #15903
- Remove the
background-color
of the sidebarContent (PR 15850 follow-up) by @Snuffleupagus in #15904 - Upgrade Node.js to version 18 in the CI workflow by @timvandermeij in #15906
- Fix pinch-to-zoom on a macbook trackpad (bug 1809080) by @calixteman in #15907
- Simplify PDFViewerApplication::supportsPrinting (follow-up of #15894) by @calixteman in #15914
- Add support for smooth pinch-to-zoom on a trackpad (bug 1659492) by @calixteman in #15909
- [api-minor] Add a new
transferPdfData
option to allow transferring more data to the worker-thread (bug 1809164) by @Snuffleupagus in #15908 - Improve input validation in
PDFDataTransportStream._onReceiveData
(PR 15908 follow-up) by @Snuffleupagus in #15917 - [api-minor] Enabling transferring of data fetched with the
PDFFetchStream
implementation by @Snuffleupagus in #15916 - Improve unit test coverage of
src/core/core_utils.js
by @timvandermeij in #15905 - Update packages and translations by @Snuffleupagus in #15924
- [Regression] Avoid showing a black canvas during zooming with a
drawingDelay
set (PR 15812 follow-up) by @Snuffleupagus in #15923 - Update
rimraf
to version 4 by @Snuffleupagus in #15925 - Update highlight background when forced colors are active (bug 1759886) by @fchasen in #15921
- [api-minor] Enable transferring of TypedArray PDF data by default (PR 15908 follow-up) by @Snuffleupagus in #15920
- Ensure that Annotation
appearance
-entries are actually Streams by @Snuffleupagus in #15926 - Move --scale-factor variable in the viewer container (fix #15929) by @calixteman in #15930
- Fallback to using the
name
table to infer the encoding for TrueType fonts missing such data (issue 15910) by @Snuffleupagus in #15934 - Update the year in the
license_header
files by @Snuffleupagus in #15940 - Use CSS variables for the textLayer
highlight
colors (PR 15921 follow-up) by @Snuffleupagus in #15937 - Add a
PDFViewerApplication
helper method to center the position after wheel/pinch-zooming by @Snuffleupagus in #15935 - [JBIG2] Ensure that the
decodeInteger
function returns valid integers (issue 15942) by @Snuffleupagus in #15945 - Change 'Current View' to 'Current Page' in the secondary toolbar by @calixteman in #15941
- [GV] Avoid to update the finder when the results aren't complete by @calixteman in #15947
- [api-minor] Deprecate calling
getDocument
directly with aPDFDataRangeTransport
-instance by @Snuffleupagus in #15943 - Move the
disableAutoFetch
functionality into theProgressBar
-class by @Snuffleupagus in #15949 - Tweak
adjustType1ToUnicode
for fonts with a predefined named encoding (bug 1811668, PR 14050 follow-up) by @Snuffleupagus in #15948 - Set up automated l10n review for new English strings by @calixteman in #15952
- Try to avoid to interpret wheel events as pinch-to-zoom ones (bug 1810800) by @calixteman in #15957
- Tweak the
normalizeWheelEventDelta
helper function by @Snuffleupagus in #15959 - Move
ProgressBar
-related CSS variables into theloadingBar
DOM-element (issue 15958) by @Snuffleupagus in #15960 - [JS] Correctly format field with numbers (bug 1811694, bug 1811510) by @calixteman in #15965
- Update packages and translations by @Snuffleupagus in #15971
- Update various README files to be less specific about the supported JavaScript features by @Snuffleupagus in #15963
- Simplify setting the
GlobalWorkerOptions
default values (PR 9480 follow-up) by @Snuffleupagus in #15966 - Tweak the internal handling of the
url
-parameter ingetDocument
(PR 13166 follow-up) by @Snuffleupagus in #15954 - Only accept non-objects passed to
getDocument
in GENERIC builds by @Snuffleupagus in #15964 - Polyfill
Path2D
in Node.js environments by @Snuffleupagus in #15951 - Change the
PDFViewerApplication.open
method to only accept objects by @Snuffleupagus in #15972
v3.2.146
This release primarily contains bugfixes and optimizations/cleanups, in particular to avoid re-rendering content unnecessarily on e.g. zooming and rotation, which should improve overall viewer performance.
Changes since v3.1.81
- Bump versions in
pdfjs.config
by @timvandermeij in #15749 - Add default icons for FileAttachment annotations (bug 1230933) by @Snuffleupagus in #15747
- Update packages and translations by @Snuffleupagus in #15750
- Slightly modernize the
FontLoader.isSyncFontLoadingSupported
getter by @Snuffleupagus in #15751 - [JS] Fix a rounding issue in printf (bug 1802888) by @calixteman in #15755
- [JS] By default, a text field value must be treated as a number (bug 1802888) by @calixteman in #15757
- [api-minor] Remove all the useless telemetry stuff in the viewer (bug 1802468) by @calixteman in #15758
- Don't add an extra space after a Katakana or a Hiragana at the eol when searching by @calixteman in #15760
- Ignore PDF documents opened from "data:"-URLs when handling internal links (bug 1803050) by @Snuffleupagus in #15762
- [Editor] Change the text annotation cursor for the high dpi screens. by @calixteman in #15718
- Stop duplicating the
platform
getter in multiple files by @Snuffleupagus in #15761 - [Annotation] Send correctly the updated values to the JS sandbox by @calixteman in #15764
- [api-minor] Remove the TextLayer
timeout
parameter (PR 15742 follow-up) by @Snuffleupagus in #15765 - Prevent the
debugger
from breaking on unbalanced save/restore OPS (issue 15767) by @Snuffleupagus in #15768 - [api-minor] Refactor the text layer code in order to avoid to recompute it on each draw by @calixteman in #15722
- Bump decode-uri-component from 0.2.0 to 0.2.2 by @dependabot in #15771
- Remove execution permission on cursor-editorFreeText.svg by @calixteman in #15772
- Enable the
no-typeof-undefined
ESLint plugin rule by @Snuffleupagus in #15752 - [api-minor] Normalize the
view
-getter on the worker-thread by @Snuffleupagus in #15773 - [api-minor] Combine the
textContent
/textContentStream
parameters by @Snuffleupagus in #15779 - Don't re-create the
structTreeLayer
on zooming and rotation by @Snuffleupagus in #15778 - [Editor] Add a very basic and incomplete workaround for issue #15780 by @calixteman in #15786
- Tighten the
vars
-argument for the ESLintno-unused-vars
rule by @Snuffleupagus in #15775 - Remove the unused
DefaultExternalServices.createDownloadManager
options (PR 12191 follow-up) by @Snuffleupagus in #15776 - [api-minor][Editor] Don't use the editor parent which can be null. by @calixteman in #15782
- [Editor] Take all the viewBox into account when computing the coordinates of an annotation in the page (fixes #15789) by @calixteman in #15791
- A few small viewer-related fixes by @Snuffleupagus in #15788
- Fix page-switching for landscape documents with SpreadModes and PresentationMode (PR 14877 follow-up) by @Snuffleupagus in #15798
- Ensure that the various layers always get the correct initial size (issue 15795) by @Snuffleupagus in #15796
- [AnnotationEditorLayerBuilder] Inline the
destroy
code in thecancel
method by @Snuffleupagus in #15800 - Change the
XfaLayerBuilder.render
method to be asynchronous by @Snuffleupagus in #15805 - Set the dimensions of the various layers at their creation by @calixteman in #15770
- Don't attempt to re-create the
annotationLayer
, for pages without any annotations, on zooming and rotation by @Snuffleupagus in #15806 - [api-minor] Add a new
PageViewport
-getter to access the original, un-scaled, viewport dimensions by @Snuffleupagus in #15797 - The annotation layer dimensions must be set before adding some elements (follow-up of #15770) by @calixteman in #15820
- [JS] Handle correctly choice widgets where the display and the export values are different (issue #15815) by @calixteman in #15819
- [JS] Run the named actions before running the format when the file is open (issue #15818) by @calixteman in #15822
- Initialize the
TextHighlighter
-instance lazily inPDFPageView
by @Snuffleupagus in #15826 - Handle possibly undefined parameters once per
AnnotationLayer.render
invocation by @Snuffleupagus in #15824 - [api-minor] Allow specifying an extra-delay, in
RenderTask.cancel
, for worker-thread aborting of operatorList parsing by @Snuffleupagus in #15825 - Don't remove the loading icon from the DOM when a page is resetted by @calixteman in #15829
- [GV] Add a viewer for GeckoView by @calixteman in #15831
- Always parse the entire
startXRefQueue
inXRef.readXRef
(issue 15833) by @Snuffleupagus in #15834 - Protect a few additional DOM element accesses in the viewer (PR 15831 follow-up) by @Snuffleupagus in #15835
- Attempt to expose
OnProgressParameters
in the TypeScript definitions (issue 15828) by @Snuffleupagus in #15832 - Strip out a reserved operator (9) from CFF char strings (fixes issue #15784) by @calixteman in #15841
- [GeckoView] Ignore the pageLayout, from the PDF document, to prevent issues by @Snuffleupagus in #15842
- [TextLayer] Hide the text layer when it's created in order to avoid reflows (fix #15844) by @calixteman in #15845
- Display the text layer before running the a11y stuff (follow-up of #15845) by @calixteman in #15847
- Avoid to compute the client rect of the viewer by @calixteman in #15830
- [Editor] Avoid to scroll when an annotation is commited (fixes issue #15744) by @calixteman in #15849
- [api-minor] Remove the default factories, used to initialize various layers, in the viewer by @Snuffleupagus in #15811
- A couple of small viewer fixes (PR 15811 and 15831 follow-up) by @Snuffleupagus in #15852
- Ensure that the
loadingIconDiv
is always visible (PR 15829 follow-up) by @Snuffleupagus in #15860 - Re-factor searching for incomplete objects in
XRef.indexObjects
(issue 15803) by @Snuffleupagus in #15854 - Update packages and translations by @Snuffleupagus in #15864
- Only redraw after zooming is finished (bug 1661253) by @calixteman in #15812
- Set a z-index for the different layers within a page (fixes #15861) by @calixteman in #15862
- [Regression] Ensure that documents with varying page sizes are initialized correctly (PR 15812 follow-up) by @Snuffleupagus in #15872
- Remove
PDFPageProxy.getJSActions
caching, since it's unused, in the API by @Snuffleupagus in #15870 - Always abort a pending
streamReader
cancel timeout inPDFPageProxy._abortOperatorList
(PR 15825 follow-up) by @Snuffleupagus in #15869 - Only display the loadingIcons when rendering is currently running by @Snuffleupagus in #15867
- Improve name consistency in the viewer (PR 15812 follow-up) by @Snuffleupagus in #15875
- Decouple the loadingBar
background-color
from the rest of the viewer by @Snuffleupagus in #15874
v3.1.81
This release primarily contains bugfixes and optimizations/cleanups, in particular a follow-up on the previous release where a dependency we use could cause installation issues on certain platforms.
Changes since v3.0.279
- Bump versions in
pdfjs.config
by @timvandermeij in #15643 - Changed link for "Gulp's getting started guide" by @SpartanApple in #15649
- [Form] Don't use field appearances when /NeedAppearances is set to true (bug 1796741) by @calixteman in #15615
- Prevent interaction with form elements in PresentationMode (issue 12232) by @Snuffleupagus in #15648
- Move canvas to optionalDependencies by @tamuratak in #15655
- [api-minor] Let
Catalog.getAllPageDicts
return an empty dictionary when loading the first /Page fails (issue 15590) by @Snuffleupagus in #15613 - Use private fields in a few more viewer classes by @Snuffleupagus in #15663
- Cache the normalized unicode-value on the
Glyph
-instance by @Snuffleupagus in #15657 - [api-minor] Initialize the unicode-category lazily on the
Glyph
-instance by @Snuffleupagus in #15665 - [api-minor] Propagate the translated font name to TextContentItem for system fonts by @sxyuan in #15659
- [Annotation] Fix printing/saving for annotations containing some non-ascii chars and with no fonts to handle them (bug 1666824) by @calixteman in #15587
- Use the full inline image as the cacheKey in
Parser.makeInlineImage
(bug 1799927) by @Snuffleupagus in #15679 - Some small
AnnotationStorage
andStatTimer
clean-up by @Snuffleupagus in #15682 - Change the
assert
inParser.findDefaultInlineStreamEnd
to a non-PRODUCTION one by @Snuffleupagus in #15686 - Update packages and translations by @Snuffleupagus in #15689
- Take the mask-offset into account when rendering repeated image masks (bug 1799927) by @Snuffleupagus in #15688
- Stop Dependabot from creating its own, otherwise unused, labels by @Snuffleupagus in #15693
- Bump minimatch from 3.0.4 to 3.1.2 by @dependabot in #15692
- Normalize fullwidth, halfwidth and circled chars when searching by @calixteman in #15694
- Initialize the find-related
DIACRITICS_EXCEPTION_STR
constant lazily by @Snuffleupagus in #15698 - Move the
_isOffscreenCanvasSupported
property to the baseAnnotation
class by @Snuffleupagus in #15699 - Remove unnecessary function names in the
src/core/worker.js
file by @Snuffleupagus in #15706 - Move some string helper functions to the worker-thread by @Snuffleupagus in #15701
- Add localization support for the
annotationLayer
reference tests (issue 10791) by @Snuffleupagus in #15710 - Reduce duplication when creating a fallback appearance for
MarkupAnnotation
s by @Snuffleupagus in #15713 - Remove the overflowing text special-case from
scrollIntoView
(issue 15714) by @Snuffleupagus in #15721 - Unblock the load event when the pdf has a password (bug 1801341) by @calixteman in #15727
- Support FileAttachments with hash-signs in the filename (issue 15729) by @Snuffleupagus in #15730
- Add support for Optional Content in TilingPatterns (issue 15716) by @Snuffleupagus in #15731
- Revert "Remove the overflowing text special-case from
scrollIntoView
(issue 15714)" by @Snuffleupagus in #15740 - Add a fallback for non-embedded composite Tahoma fonts (issue 15719) by @Snuffleupagus in #15732
- [api-minor] Deprecate the TextLayer
timeout
parameter by @Snuffleupagus in #15742 - Re-factor and simplify the
getQuadPoints
helper function by @Snuffleupagus in #15715 - Ensure that the initial document position is always correct with non-default Scroll/Spread modes (issue 15695) by @Snuffleupagus in #15720
v3.0.279
This major release features the new editor mode in the viewer (enabled by default now), new icons in the viewer, removal of deprecated functionality/APIs, removal of support for outdated browser versions, font conversion/text selection improvements and other features/bugfixes.
Changes since v2.16.105
- Bump versions in
pdfjs.config
by @timvandermeij in #15357 - [api-major] Remove the
enhanceTextSelection
functionality (PR 15145 follow-up) by @Snuffleupagus in #15259 - [api-major] Remove (most of) the remaining
deprecated
code by @Snuffleupagus in #15286 - [api-minor] Support Named-actions in the outline (issue 15367) by @Snuffleupagus in #15368
- [Editor] Avoid to update default params too early by @calixteman in #15369
- [Editor] Use the global clipboard for the copy/paste/cut operations by @calixteman in #15373
- [Editor] Remove some useless code (#15373 follow-up) by @calixteman in #15381
- [Editor] Update some strings (bug 1787299) by @calixteman in #15378
- Update editing icons (bug 1785248) by @calixteman in #15385
- [Editor] Change the cursor when we switch to FreeText mode (bug 1787297) by @calixteman in #15386
- Remove the
browserify
example by @Snuffleupagus in #15388 - Properly ignore PopupAnnotations with custom
trigger
-elements by @Snuffleupagus in #15360 - Remove Bower support in
pdfjs-dist
by @Snuffleupagus in #15390 - [api-minor] Add basic support for the
SetOCGState
action (issue 15372) by @Snuffleupagus in #15377 - Update packages and translations by @Snuffleupagus in #15394
- Don't replace cr by a white space when the last char on the line is an ideographic char by @calixteman in #15395
- Don't allow
adjustToUnicode
to extend a built-in /ToUnicode map (issue 15352) by @Snuffleupagus in #15392 - Fallback to a standard font when a Type1 font program is empty (issue 15292) by @Snuffleupagus in #15397
- Remove the "tagged" telemetry-reporting by @Snuffleupagus in #15402
- Use more optional chaining in the code-base by @Snuffleupagus in #15398
- Update some icons in the toolbar (bug 1739965) by @calixteman in #15384
- Set a display value for the secondary toolbar buttons by @calixteman in #15413
- Move 'presentation mode' and 'bookmarks' buttons in the secondary toolbar (bug 1789082) by @calixteman in #15391
- Don't listen for window resolution changes in old browsers (PR 15319 follow-up) by @Snuffleupagus in #15418
- Fix the visibility of a separator in the secondaryToolbar (PR 15391 follow-up) by @Snuffleupagus in #15421
- Send the
verbosity
when using a workerPort (issue 15419) by @Snuffleupagus in #15420 - Remove the abstract
BaseViewer
-class by @Snuffleupagus in #15414 - Add some telemetry to know how often the buttons in the secondary toolbar are used (bug 1789883) by @calixteman in #15416
- Don't try to update the cursorTool when switching to PresentationMode failed by @Snuffleupagus in #15425
- Disable the editing-indicator, in the document title, during printing (bug 1790552, PR 15351 follow-up) by @Snuffleupagus in #15431
- [api-major] Enable editing by default by @Snuffleupagus in #15339
- [api-minor] Use
new Worker()
syntax in webpack entrypoint by @srmagura in #15430 - Extend
getGlyphMapForStandardFonts
with some quote-entries (issue 15441) by @Snuffleupagus in #15442 - Extend
getSupplementalGlyphMapForCalibri
with more entries (issue 15443) by @Snuffleupagus in #15445 - Update packages and translations by @Snuffleupagus in #15454
- Remove the
enableScripting
-parameter from the component examples (PR 13816 follow-up) by @Snuffleupagus in #15446 - [api-major] Update the minimum supported browsers/environments by @Snuffleupagus in #15451
- Temporarily stop listing the official Chrome extension in the main README by @Snuffleupagus in #15452
- Some small viewer clean-up for non-GENERIC builds by @Snuffleupagus in #15432
- Don't update the Scroll/Spread-mode in the ViewHistory while PresentationMode is active (issue 15453) by @Snuffleupagus in #15455
- Improve CSS for HCM (bug 1726183) by @calixteman in #15438
- Replace some unnecessary
String.prototype.search
usage by @Snuffleupagus in #15458 - Don't use window.print in the Firefox builtin viewer (bug 1774427) by @calixteman in #15459
- Enable the
unicorn/prefer-regexp-test
ESLint plugin rule by @Snuffleupagus in #15460 - [XFA] - Avoid an exception when zooming on a XFA by @calixteman in #15462
- Use AccentColor as background for selected text in the text layer (bug 1790309) by @calixteman in #15461
- Fix commFunc typo in the SandboxSupportBase.destroy method by @nmtigor in #15473
- Fix #selectEditors typo in the AnnotationEditorUIManager.unselectAll method by @nmtigor in #15474
- [Editor] Make sure to have the annotation editor layer on top of the annotation one (bug 1791515) by @calixteman in #15468
- [XFA] Fix an hidden issue in the FormCalc lexer by @calixteman in #15476
- Access the
setTimeout
-functionRefs correctly inSandboxSupportBase.destroy
by @Snuffleupagus in #15477 - Initialize values in the path bounding box before flushing the operator list (bug 1791583) by @calixteman in #15478
- [JS] Remove duplicate
this._document
assignment in theApp
-class by @Snuffleupagus in #15483 - Restore the old fonts in the debugger (PR 15438 follow-up) by @Snuffleupagus in #15489
- Set a
border-radius
when hovering annotationLayer-inputs (PR 15438 follow-up) by @Snuffleupagus in #15491 - [JS] Try to guess what the date is when it doesn't follow the given format (issue #15490) by @calixteman in #15493
- Tweak the heuristic that handles JPEG images with a wildly incorrect SOF (Start of Frame)
scanLines
parameter (issue 15492) by @Snuffleupagus in #15494 - Revert "Don't use window.print in the Firefox builtin viewer (bug 1774427)" by @calixteman in #15495
- Replace some
Array.prototype
-usage with spread syntax by @Snuffleupagus in #15498 - Use more optional chaining in the code-base (PR 15398 follow-up) by @Snuffleupagus in #15485
- Reference supported browsers Wiki-page in more README files by @Snuffleupagus in #15499
- [api-minor] Stop exposing the
LoopbackPort
class in the API by @Snuffleupagus in #15500 - Restore the old fonts in the
errorWrapper
(PR 15438 follow-up) by @Snuffleupagus in #15501 - Use a consistent
outline
for all UI buttons (PR 15438 follow-up) by @Snuffleupagus in #15503 - Use
stopImmediatePropagation
without checking for its existence first by @Snuffleupagus in #15504 - Improve the
FontLoader
code by @Snuffleupagus in #15507 - Fix property chain orders of Operators in isDotExpression by @nmtigor in #15486
- [JS] Override the
Doc.external
-getter to avoidalert
-modals on load (issue 15509) by @Snuffleupagus in #15512 - [Editing] Disable the HandTool during editing (bug 1792422) by @Snuffleupagus in #15522
- [JS] Add the function AFExactMatch by @calixteman in #15527
- Revert "Don't listen for window resolution changes in old browsers (PR 15319 follow-up)" by @Snuffleupagus in #15515
- Add more non-standard ligatures in the
glyphlist.js
file (issue 15516) by @Snuffleupagus in #15517 - Replace the
DOMMatrix
polyfill, used with Node.js, with the one fromnode-canvas
by @Snuffleupagus in https://gith...
v2.16.105
This release features bugfixes and accessibility improvements for the new experimental editor mode in the viewer as introduced in the previous release.
Changes since v2.15.349:
#15252 Bump versions in pdfjs.config
#15251 Ignore too small page-canvases in PDFThumbnailView.setImage
#15253 [api-minor] Update the minimum supported Safari version
#15263 Always set a border-radius for RadioButton annotations (issue 15262)
#15264 [Editor] Add some telemetry to know how often the editing features are used (bug 1782254)
#15268 Fix a typo in firefox print service (bug 1777693)
#15271 Skip unknown fields when calculating a value in using AFSimple_Calculate
#15267 [Annotation] Add a div containing the text of a FreeText annotation (bug 1780375)
#15274 [Editor] A pasted FreeText editor was missing when printing/saving
#15275 [Editor] Remove some a11y properties only useful when a FreeText editor is edited
#15282 Enable the ESLint prefer-spread
rule
#15261 Don't include images/toolbarButton-editorInk.svg
in the gulp components
build (issue 15260)
#15281 Remove mozCurrentTransform
/mozCurrentTransformInverse
usage
#15283 [api-minor] Sort PopupAnnotations already on the worker-thread (PR 11535 follow-up)
#15284 Update packages and translations
#15287 [Editor] Remove use of innerHtml
#15290 Fix OTS issue with empty index (#15289)
#15295 [Editing] Disable buttons until the first page is rendered
#15296 Move the reset
-calls to occur last in the toolbar-constructors
#15297 [Editor] Avoid creation of an editor on "wrong" clicks
#15298 [Editor] Ensure an ink editor has the minimal required size after having been pasted
#15279 Remove the extensions/firefox/README.mozilla
file (bug 1778567 follow-up)
#15299 Add official support for passing ArrayBuffer
-data to getDocument
(issue 15269)
#15237 [Annotations] Add some aria-owns in the text layer to link to annotations (bug 1780375)
#15307 [Annotation] Add an aria role comment for FreeText annotations
#15309 Remove the remaining closure in the src/core/function.js
file
#15306 Only compile Type3 glyphs when Path2D
is supported
#15300 [GENERIC viewer] Export some viewer constants in the default viewer (issue 15294)
#15311 Don't add aria-owns
attributes for non-existent elements (PR 15237 follow-up)
#15310 Remove the remaining closures in the src/core/cff_parser.js
file
#15313 Move binarySearchFirstItem
back to the web/
-folder (PR 15237 follow-up)
#15319 Refresh the viewer if the window resolution changes (bug 1784850)
#15318 A couple of small PDFWorker
changes
#15315 Remove the remaining closures in the src/core/type1_parser.js
file
#15325 Ignoring "resize" events during printing (issue 15324)
#15327 Correctly mimic the proper event-format in AnnotationElement._setDefaultPropertiesFromJS
(bug 1785218)
#15329 [api-minor][Annotations] charLimit === 0 means unlimited (bug 1782564)
#15338 Update packages and translations
#15332 [api-minor] Add the Babel targets
-option to avoid transpiling code for unsupported browsers
#15335 Ensure that we don't try to re-open, or update the password-callback, when the password dialog is already open
#15348 [editor] Change the focus-outline to blue (bug 1787296)
#15347 Update types in PDFPageViewOptions to properly declare optional parameters
#15355 Always focus the viewerContainer
when entering PresentationMode (bug 1787456)
#15344 Enable the unicorn/prefer-array-find
ESLint plugin rule
#15343 Use AbortController
unconditionally with the Fetch API
#15341 Improve handling of the "Cancel"-button in the password dialog
#15346 [api-minor] Deprecate the imageLayer
functionality
#15351 [api-minor][editor] Indicate, in the title, if the document has been edited (bug 1785854)
#15349 [editor] Remove the editorNone
toolbar button (bug 1787295)
#15356 Update the Node.js atob
/btoa
compatibility info
v2.15.349
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 id
s 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 id
s 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 id
s 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...
v2.14.305
This release features improvements for the text layer (space insertion), canvas rendering (thin line rendering), forms (printing/saving of choice lists) and accessibility (sidebar and search results). Moreover, this release contains performance improvements for rendering image masks, Type3 fonts and certain drawing instructions. Finally, the user can now specify custom background/foreground colors for rendering in the viewer.
Changes since v2.13.216:
#14614 Bump versions in pdfjs.config
#14536 Fix some issues with lineWidth < 1 after transform (bug 1753075, bug 1743245, bug 1710019)
#14615 Remove the -webkit-overflow-scrolling: touch;
CSS rules (PR 4516 follow-up)
#14617 Remove the -webkit-outer-spin-button
CSS rule
#14623 Remove some deprecated code from the viewer
#14624 Simplify the fallback
-logic in the default viewer
#14629 Compute the loca table endOffset
, of the "first" glyph, correctly (issue 14618)
#14631 Fix a couple of small typos in JSDoc typedef
comments
#14628 When stopAtErrors
is set, throw rather than warn when exceeding maxImageSize
(issue 14626)
#14634 Replace XMLHttpRequest usage with the Fetch API in Driver.run
#14633 Update packages and translations
#14635 Replace XMLHttpRequest usage with the Fetch API in loadStyles
(in test/driver.js
)
#14638 Replace XMLHttpRequest usage with the Fetch API in the reftest-analyzer
#14637 Use proper private methods in web/{pdf_cursor_tools,pdf_find_bar,secondary_toolbar}.js
#14636 Replace XMLHttpRequest usage with the Fetch API in Driver._quit
#14640 Update TypeScript to version 4.6.2
and work-around stricter type checks
#14648 Simplify the PDFDocument
constructor
#14645 [api-minor] Remove the, in legacy
builds, bundled DOMMatrix
polyfill
#14642 Replace XMLHttpRequest usage with the Fetch API in Driver._send
#14651 Replace XMLHttpRequest usage with the Fetch API in inlineImages
(in test/driver.js
)
#14620 Bug 1757527 - Slightly reduce (repeated) message passing overhead when localizing the PDF Viewer
#14554 Try to improve a11y for the "button groups" in the SecondaryToolbar/Sidebar (issue 14526)
#14654 Replace XMLHttpRequest usage with the Fetch API in send
(in test/unit/testreporter.js
)
#14656 Move the isSameOrigin
helper function
#14658 Validate the cMapUrl
/standardFontDataUrl
parameters in getDocument
#14661 Update Checkout to version 3
#14667 Enable the "gets fieldObjects" unit-test in Node.js (PR 14409 follow-up)
#14668 Remove the addLinkAttributes
warnings in the Annotation/XFA-layers (PR 14092 follow-up)
#14665 Convert the BasePreferences
class to use private fields
#14669 Replace dir
-dependent padding-left
/padding-right
/text-align
with logical properties
#14676 Remove the custom grab
/grabbing
cursor image files
#14678 Convert the PDFDocumentProperties
class to use private methods
#14675 Build the web/viewer.css
file used in the development viewer (i.e. gulp server
)
#14682 [gulpfile.js] Use the regular defines
in the preprocessCSS
function
#14688 Add general iteration support in the RefSet
and RefSetCache
classes
#14683 [src/display/api.js] Simplify the sendTest
function, used with Worker initialization (PR 14291 follow-up)
#14689 Slightly simplify the PDFFindController._extractText
method, and convert all "private" methods into proper ones
#14670 Replace dir
-dependent margin
/margin-left
/margin-right
with logical properties
#14671 Replace dir
-dependent float
with logical properties
#14692 [JS] - Parse a date in using the given format first and then try the default date parser
#14695 Update packages and translations
#14690 Replace dir
-dependent left
/right
with logical properties
#14704 Convert the OverlayManager
class to use private fields/methods
#14699 Slightly improve validation of (some) parameters in getDocument
#14691 Replace dir
-dependent border
-rules with logical properties
#14693 Remove the remaining dir
-dependent CSS rules
#14717 Change the type of the container
property, in the TextLayerRenderParameters
typedef (issue 14716)
#14715 Avoid the textLayer
becoming visible in high contrast mode (issue 13230)
#14703 [text selection] Add the whitespaces present in the pdf in the text chunk
#14720 [Annotations] Add support for printing/saving choice list with multiple selections
#14710 Convert the existing overlays to use <dialog>
elements (issue 14698)
#14733 Use String.prototype.repeat()
in a couple of spots
#14735 [Annotations] Some annotations can have their values stored in the xfa:datasets
#14734 Don't manually convert setAttribute
values to strings (PR 14554 follow-up)
#14738 Decode non-ASCII values found in the xfa:datasets (PR 14735 follow-up)
#14742 Replace most loops in web/debugger.js
with for...of
loops
#14744 Update GitHub Actions workflow steps/dependencies/translations to the most recent versions
#14745 Convert web/debugger.js
to a basic module
#14739 Refactor some xfa*** getters in document.js
#14663 [GENERIC viewer] Try to improve a11y, for search results, in the findbar (issue 14525)
#14761 Use a bit more optional chaining in the viewer
#14751 Re-factor the isLittleEndian
/isEvalSupported
caching
#14750 Remove the BaseViewer._getCurrentVisiblePage
helper method
#14754 [api-minor] Improve performance with image masks (bug 857031)
#14766 Improve performance of applyMaskImageData
#14764 Correct typos
#14765 Simplify handling of requestFullscreen
errors in PDFPresentationMode
#14767 [GENERIC viewer] Re-factor the fileInput
initialization
#14769 Remove unnecessary @media
CSS rules (PR 8993 follow-up)
#14770 Always remove the sidebarMoving
CSS class when the sidebar is closed
#14771 Simplify the dialog::backdrop
CSS rules (PR 14710 follow-up)
#14772 Remove/simplify some CSS rules
#14773 Remove some dropdownToolbarButton
-related CSS rules
#14780 Replace the --viewport-scale-factor
CSS variable
#14722 PDFScriptingManager: Bind mousedown listener with capture=true
#14784 Improve performance of shared/utils.js::intersect (bug 1135277)
#14785 Update core-js
to allow removing a structuredClone
work-around
#14777 [api-minor] Improve performances with image masks (bug 857031)
#14796 [api-minor] Simplify min/max computations in constructPath (bug 1135277)
#14797 Don't clip when the clip path is empty (issue #12306)
#14799 Fix clipping issue with pattern (follow-up of #14797)
#14788 Move the PDFBug
-related CSS from viewer.css
and into its own file
#14790 Remove some outdated CSS rules related to printing
#14792 Update packages and translations
#14795 Reduce more duplication in the CSS
#14793 Simplify spread-mode handling for the PAGE scroll-mode
#14801 [GENERIC viewer] Simplify the styling of the previous/next findbar buttons
#14803 Add support for the /Catalog Base-URI when resolving URLs (issue 14802)
#14794 Remove the PresentationMode special-case from BaseViewer.update
#14810 Stop bundling errorWrapper
CSS rules in the MOZCENTRAL build
#14817 Some more, small, CSS clean-up
#14818 Use correct case for JavaScript
#14815 Ignore non-Stream /SMask-entries when parsing images (issue 14814)
#14828 Use more for...of
loops in the viewer
#14827 Simplify setting of spacing at the left/right edges of the toolbar(s)
#14823 Ignore invalid /Encoding-entries when parsing fonts (issue 14821)
#14825 Ensure that worker-thread image caching doesn't break optional content (issue 14824)
#14829 Remove unnecessary print
CSS rules
#14831 Add a helper function for incrementing the count
of cached ImageMasks
#14836 Don't use pref 'browser.download.improvements_to_download_panel' in Firefox (#14822)
#14848 Support destinations in NameTrees with encoded keys (issue 14847)
#14833 Stop bundling the openFile-buttons in the MOZCENTRAL build
#14835 Clean-up some CSS rules for the various toolbar separators
#14856 [api-minor] Remove the forceClamped
-functionality in the Streams (issue 14849)
#14853 Use integer coordinates when drawing images (bug 1264608, issue #3351)
#14854 Remove redundant class names from the button DOM-elements
#14857 Inline the webViewerOpenFileViaURL
function in webViewerInitialized
#14860 Update dependencies and translations
#14858 Use Path2D
, if available, when rendering Type3-fonts (bug 810214)
#14861 Pin the es-module-shims
dependency to version 1.4.7
#14863 Update quickjs to revision 2788d71e823b522b178db3b3660ce93689534e6d
#14865 Support encoded dest-strings in /GoTo destination dictionaries (issue 14864)
#14866 Immediately release the temporary Uint8Array
s used during Type3-compilation
#14869 [JS] Fix few bugs present in the pdf for issue #14862
#14873 Replace the AnnotationStorage.lastModified
-getter with a proper hash-method
#14870 Only bundle the src/display/node_utils.js
file in GENERIC-builds
#14871 Re-factor the PresentationMode handling in BaseViewer.#ensurePageViewVisible
#14874 [api-minor] Improve pdf reading in high contrast mode
#14877 Add (basic) support for Spread modes in PresentationMode (issue 14749)
#14880 Introduce a --viewer-container-height
CSS variable to simplify the code
#14884 Simplify the "fileattachmentannotation"-event handling a little bit
#14882 Add support for TrueType format 12 cmap
s (issue 14881)
#14887 Ignore pageColors
when the background/foreground is identical (PR 14874 follow-up)
#14885 Stop bundling PDFViewerApplication.{unbindEvents, unbindWindowEvents}
in MOZCENTRAL builds
#14888 Try to fix dispatching of "attachmentsloaded"-events, when the document contains no "regular" attachments (PR 8788, 12163 follow-up)
#14886 Use the regular preprocess
-function for the CSS files as well
#14890 [JS] Formatted value has to be a string when neither null nor undefined
#14903 Update the preprocess
-function to avoid adding trailing new-lines (issue 14902)
#14904 Avoid the preprocess
...
v2.13.216
This release features improvements for searching in the viewer: searching with/without diacritics, arbitrary whitespace matching, searching for hyphenated words when linebreaks are present and searching around punctuation characters. Moreover, this release contains many bugfixes and optimizations, in particular for annotations, font/image conversion, SMask rendering, text layer rendering and TypeScript definitions.
Changes since v2.12.313:
#13261 [api-minor] Support search with or without diacritics (bug 1508345, bug 916883, bug 1651113)
#14389 Bump versions in pdfjs.config
#14388 Unblock the "load" event in inactive windows/tabs (bug 1746213, PR 11646 follow-up)
#14401 Update packages and translations
#14391 Handle non-integer Annotation border widths correctly (issue 14203)
#14400 [api-minor] Convert Catalog.getPageDict
to an asynchronous method
#14409 Improve caching for the Catalog.getPageIndex
method (PR 13319 follow-up)
#14411 Convert Catalog.getAllPageDicts
to an async
method
#14413 Drop the beta logic from the Gulpfile/website/pdfjs.config
file
#14417 Revert "Disable failing print actions integration test in Firefox"
#14418 Use positive dimensions for text chunks in the text layer (issue #14415)
#14429 [JS] Fix few errors around AFSpecial_Keystroke
#14423 Remove the eventBus
parameter from getViewerConfiguration
#14424 [api-minor] Move addLinkAttributes
, LinkTarget
, and removeNullCharacters
into the viewer (PR 14092 follow-up)
#14432 Update packages and translations
#14443 Prevent run-time errors in BaseViewer
when it's falling back to SimpleLinkService
(issue 14442, PR 14295 follow-up)
#14450 Add (basic) UTF-8 support in the stringToPDFString
helper function (issue 14449)
#14446 Expose even more API-functionality in the TypeScript definitions (issue 14435, PR 14013 follow-up)
#14454 Replace some assert
usage with unreachable
in the src/shared/util.js
file
#14453 Dispatch a "documenterror" event in PDFViewerApplication._documentError
(issue 14451)
#14439 Ignore Annotations with empty /Rect-entries in the display-layer (issue 14438)
#14448 Prevent circular references in Type3 fonts
#14428 Use the correct dimension to know if we have to add an EOL in vertical mode
#14455 Make the normalizeWhitespace
handling, in the PartialEvaluator
, more efficient (PR 14428 follow-up)
#14457 Implement a unit test for getCharUnicodeCategory
in src/core/unicode.js
(PR 14428 follow-up)
#14456 Font renderer - get int8 instead of uint8 in composite glyphes (bug 1749563)
#14464 Support Type1 font files with incomplete /CharStrings definitions (issue 14462)
#14430 [JS] Use beforeinput event to trigger a keystroke event in the sandbox
#14487 Remove the out.pdf
file (PR 14430 follow-up)
#14489 Fix scripting test related to keystroke event
#14483 Remove the invisible format marks from the text chunks
#14479 Update packages and translations
#14490 Add a (global) cache to the getCharUnicodeCategory
function
#14495 web: Read WheelEvent.deltaMode before deltas.
#14500 Take into account all rotations before comparing glyph positions
#14491 fix for lines (stroke) are rendered too thick (Bug 1743245)
#14506 Update the year in the license_header
files
#14392 Polyfill structuredClone
with core-js (PR 13948 follow-up)
#14507 Bump copy-props from 2.0.4 to 2.0.5
#14508 Bump nanoid from 3.1.30 to 3.2.0
#14513 Update quickjs sandbox
#14510 [api-minor] Annotations - Adjust the font size in text field in considering the total width (bug 1721335)
#14517 Disable the browser-tests, during gulp makeref
, in Google Chrome on the Windows bot (PR 14392 follow-up)
#14516 [UI] Avoid to have buttons in hover state after having been clicked (bug 836732)
#14518 Remove the MBTA-pretax-form-July2012
browser-test since it's a duplicate
#14522 Remove the xfa_bug1716838
browser-test since it's a duplicate
#14515 [api-minor] Remove support for browsers/environments without fully working URL.createObjectURL
implementations
#14527 [api-minor] Remove the normalizeWhitespace
option in the PDFPageProxy.{getTextContent, streamTextContent}
methods (issue 14519, PR 14428 follow-up)
#14535 [GENERIC viewer] Use consistent casing, for the labels, in the findbar
#14532 [GENERIC viewer] Remove the moz
-prefixed FullScreen API usage from the viewer
#14530 Avoid the findResultsCount
span taking up (vertical) space when hidden (PR 13261 follow-up)
#14537 Update packages and translations
#14539 Bump simple-get from 3.1.0 to 3.1.1
#14538 [api-minor] Update the minimum supported browser versions
#14548 [api-minor] Ensure that the PDFDocumentLoadingTask
-promise is rejected when cancelling the PasswordPrompt (bug 1754421)
#14547 Update the file used with the xfa_bug1720182
test-case
#14543 Let Lexer.getNumber
treat a single minus sign as zero (bug 1753983)
#14551 [api-minor] Stop exposing the createObjectURL
helper function in the API
#14557 Remove unnecessary font-size
CSS rule from the html
element (issue 14555, PR 3794 follow-up)
#14558 Remove the UTF-8 fallback, when TextDecoder
is missing, from the Content-Disposition parser
#14560 [api-minor] Remove the, in legacy
builds, bundled ReadableStream
polyfill
#14559 Revert "Don't block origin-less blob:-URLs in hosted viewer"
#14564 [api-minor] Don't add in the text content the chars which are out-of-page (bug 1755201)
#14563 [Search] Some matches were incorrectly shifted because of some '-\n'
#14572 Add a missing string-check in the _collectJS
helper function
#14566 Miscellaneous small viewer clean-up
#14569 Fix canvas state getting out of sync from smasks. (bug 1755507)
#14581 Use the (viewer) parseQueryString
helper function in the reference tests
#14580 Change PixelsPerInch
to a class with static
properties (issue 14579)
#14578 Remove the backingStorePixelRatio
-part of the getOutputScale
helper function
#14575 Remove the isStream
helper function
#14577 Remove the isRef
helper function
#14584 Update packages and translations
#14585 Improve the PDFObjects
class
#14594 Prefer instanceof ...
rather than calling isCmd
/isDict
/isName
with one argument
#14596 Remove the isNum
helper function
#14595 Update the support information for structuredClone
(PR 14392 follow-up)
#14588 Remove old prefixed CSS rules used with text
tests
#14597 Ensure that Dict.set
only accepts string key
s
#14598 Re-factor the Catalog.viewerPreferences
method and remove the isBool
helper function
#14545 Generate test images at different output scales.
#14605 Simplify the decodeFontData
/encodeFontData
font-test helper functions
#14608 Don't close window from test driver.
#14609 Improvements to the reftest analyzer.
#14599 Ensure that Cmd
/Name
is only initialized with string arguments
#14600 [api-minor] Add validation for the PDFDocumentProxy.getPageIndex
method
#14607 Simplify the wrapReason
helper function
#14606 Only support the standard, unprefixed, Fullscreen API in the default viewer
#14602 Re-factor the PDFDocument.documentInfo
method, and remove the isString
helper function
#14610 [JPEG 2000] Add support for resetContextProbabilities (bug 1731483)
#14611 Remove the JSDocs "External: Promise"-page, since Promise
s are now a standard feature
#14612 Add the caniuse-lite
package