npm pdfjs-dist 2.12.313
v2.12.313

latest releases: 4.8.69, 4.7.76, 4.6.82...
2 years ago

This release features improved XFA support, improved pattern/tiling support, rich text annotation support, a new page scrolling mode in the viewer and many other bugfixes and optimizations.

Changes since v2.11.338:

#14097 Bump versions in pdfjs.config
#14099 Update packages and translations
#14101 [Regression] Fix comb fields scrolling when the last character is entered (PR 14049 follow-up)
#14111 Take the /CIDToGIDMap data into account when computing the hash, in PartialEvaluator.preEvaluateFont, for composite fonts (bug 1734802)
#14106 Empty name is allowed in ISO 32000
#14108 For Annotations that define a closed area, make all of it toggle the PopupAnnotation (issue 14107)
#14118 Implement TrueType character map "format 2" (fixes #14117)
#14116 Use even more optional chaining in the src/display/api.js file
#14134 Convert examples/node/pdf2png/pdf2png.js to await/async
#14138 Convert examples/learning/helloworld.html to await/async
#14143 docs: Fix grammatical error
#14141 Convert examples/text-only/pdf2svg.js to await/async
#14145 XFA - Embedded image is missing
#14148 Ensure that the EditorConfig rules apply to *.json and *.pdf.link files as well
#14131 Ensure that pre-rendering works correctly with spreadModes at higher zoom levels
#14112 Add a new Page scrolling mode (issue 2638, 8952, 10907)
#14149 Convert examples/learning/helloworld64.html to await/async
#14103 [api-minor] Change PDFFindController to use the "find"-event directly (issue 12731)
#14152 Fix a xfaFaxtory typo in the shadowing in the PDFDocument.xfaFactory getter, and some other clean-up
#14166 Ignore Square/Circle-annnotations with a zero borderWidth when creating a fallback appearance stream (issue 14164)
#14114 [api-minor] Include the /Lang-property in the documentInfo, and use it in the viewer (issue 14110)
#14154 Update packages and translations
#14155 Revert "For mozcentral use Firefox color theme instead of system theme." since -moz-toolbar-prefers-color-scheme was removed
#14160 Fix pattern handling regression in SVGGraphics (PR 13770 follow-up)
#14159 Convert examples/node/pdf2svg.js to await/async #14125
#14174 Prevent double-rendering borders for PushButton-annotations (PR 14083 follow-up)
#14167 Convert examples/image_decoders/jpeg_viewer.js to await/async #14123
#14171 Prevent run-time errors in Node.js versions with URL.createObjectURL support (issue 14170)
#14162 Indent the stepper on save/restore.
#14175 Use a new method for handling soft masks.
#14178 Update the browserslist database
#14156 Add support for modern ECMAScript class features
#14158 Improve pre-rendering at the start/end of the document
#14181 Converted simpleviewer.js to await/async
#14199 Avoid to display download panel during integration tests
#14189 [api-minor] Implement securityHandler in the scripting API (bug 1731578)
#14192 [Regression] Prevent breaking errors when opening a new document in the GENERIC viewer (PR 14158 follow-up)
#14191 Ignore pageLabels, in the viewer, when they're all empty
#14180 Handle ranges that "overflow" the last byte in CMap.mapBfRange (bug 1627427)
#14153 Fix XFA links (bug 1735738)
#14204 Remove the shadowViewer used with Page scrolling
#14201 Use the correct border-style for Annotations, when a dash array is specified (bug 1219400)
#14207 JS - Avoid a popup to ask for specific version of Acrobat
#14210 Update packages and translations
#14182 [api-minor] Support rich content in markup annotation
#14212 Add a RTL-text reference test (issue 10301)
#14217 [Firefox] Handle errors if loading failed before the "supportsRangedLoading" message was sent (bug 1732141)
#14221 Use BaseViewer.previousPage more in the default viewer (PR 12870 follow-up)
#14225 Avoid doing unnecessary checks, when pre-rendering page layouts with "holes" (PR 14131 follow-up)
#14228 Reset path bounding box tracking when starting a new path.
#14213 Tweak the Bidi-detection heuristics for very short RTL strings (issue 11656)
#14219 Let getVisibleElements return a Set containing the visible element ids
#14232 Use correct matrix for patterns with showText.
#14218 XFA subform with occur min=0 and no bound data displaying.
#14238 Add a couple of basic unit-tests for PDFPageViewBuffer
#14241 Don't double apply a group xobject's bbox.
#14230 Create shading patterns the size of the current path. (bug 1722807)
#14244 Prevent mobile devices from interfering with the textLayer-elements (issue 14243)
#14240 XFA - Get each page asynchronously in order to avoid blocking the event loop (#14014)
#14245 Convert PDFPageViewBuffer to a standard class, and use a Set internally
#14250 XFA - Encode tag names in UTF-8 when saving (fix #14249)
#14239 XFA - Fix a breakBefore issue when target is a contentArea and startNew is 1 (bug 1739502)
#14209 [Google Chrome] Ensure that markedContent spans are placed in the top-left corner (issue 14205)
#14258 Always prefer abbreviated keys, over full ones, when doing any dictionary lookups (issue 14256)
#14265 XFA - Avoid an exception when looking for a font in a parent node
#14266 Don't consider space as real space when there is an extra spacing (bug 931481)
#14270 When parsing corrupt documents without any trailer-dictionary, fallback to the "top"-dictionary (issue 14269)
#14268 Remove non-displayable chars from outline title (#14267)
#14253 [Chromium addon] Add the Page scrolling mode to the options (PR 14112 follow-up)
#14260 Report "pageInfo" telemetry once, rather than for each rendered page
#14271 Parse query string in using URLSearchParams
#14255 Convert GrabToPan to a standard class
#14273 Update packages and translations
#14247 [api-minor] Render pushbuttons on their own canvas (bug 1737260)
#14280 Slightly optimize spreadMode toggling with ScrollMode.PAGE set (PR 14112 follow-up)
#14278 Replace the remaining Node.removeChild() instances with Element.remove()
#14276 Only show the loadingIcon-spinner on visible pages (issue 14242)
#14262 Include the /Lang-property, when it exists, in the StructTree-data (issue 14261)
#14229 Add an easy way to log to the terminal during browser tests.
#14291 [api-minor] Only use Workers when postMessage transfers are supported (PR 11123 follow-up)
#14294 [api-minor] Replace PDFDocumentProxy.getStats with a synchronous PDFDocumentProxy.stats getter
#14295 Remove the {BaseViewer, PDFThumbnailViewer}._pagesRequests caches
#14299 Convert examples/components/pageviewer.js to await/async (issue 14127)
#14304 Ensure that ChunkedStream won't attempt to request data beyond the document size (issue 14303)
#14298 Center pages vertically in PresentationMode (issue 10906)
#14310 Abort parsing when the XRef /W-array contain bogus entries (issue 14303)
#14314 [Regression] Prevent errors, during loading, in the viewer for XFA-documents (PR 14295 follow-up)
#14318 Handle sub/super-scripts in rich text
#14319 XFA - Draw arcs correctly
#14313 Change the _pagePromises cache, in the worker, from an Array to a Map
#14311 [api-minor] Validate the /Pages-tree /Count entry during document initialization (issue 14303)
#14320 Update packages and translations
#14312 Prevent circular references in XRef tables from hanging the worker-thread (issue 14303)
#14321 Upgrade to Puppeteer 12
#14333 Handle errors correctly when data lookup fails during /Pages-tree parsing (issue 14303)
#14325 Remove the unused skipCount parameter from Catalog.getPageDict (PR 14311 follow-up)
#14328 Update (primarily) the Node.js examples to release page resources
#14335 [Regression] Eagerly fetch/parse the entire /Pages-tree in corrupt documents (issue 14303, PR 14311 follow-up)
#14324 Enforce PAGE-scrolling for very large/long documents (bug 1588435, PR 11263 follow-up)
#14341 Ensure that the shadow helper function is passed a valid property (PR 14152 follow-up)
#14340 Handle errors when fetching the raw /Metadata (issue 14305)
#14338 [api-minor] Clear all caches in XRef.indexObjects, and improve /Root dictionary validation in XRef.parse (issue 14303)
#14339 Add a (linked) test-case for issue 8019
#14345 Ensure that the viewer handles BaseViewer initialization failures
#14344 Modernize the test driver
#14348 Add a (linked) test-case for issue 8022
#14347 Improve caching in Catalog.getPageDict (PR 8207 follow-up)
#14350 Prevent an infinite loop when parsing corrupt /CCITTFaxDecode data (issue 14305)
#14354 Further improve caching in Catalog.getPageDict, for disableAutoFetch mode (PR 8207 follow-up)
#14355 Change WorkerTransport.{pageCache, pagePromises} from an Array to a Map
#14358 Improve PDFDocument.checkLastPage/Catalog.getAllPageDicts for documents with corrupt XRef tables (PR 14311, 14335 follow-up)
#14359 Avoid overloading the worker-thread during eager page initialization in the viewer (PR 11263 follow-up)
#14361 Upgrade Node.js to version 16 in the CI workflow
#14360 Update packages and translations
#14362 Support disabling of form editing when pdfjs.enablePermissions is set (issue 14356)
#14364 Only call PDFDocumentProxy.getPermissions, in the viewer, when pdfjs.enablePermissions is set (PR 14362 follow-up)
#14367 Disable failing print actions integration test in Firefox
#14368 Consistently use string arguments for page.waitForFunction calls and upgrade to Puppeteer 13.0.0
#14380 Move the EventBus, and related functionality, into its own file
#14372 Move the /Lang handling into the BaseViewer (PR 14114 follow-up)
#14370 Slightly reduce asynchronicity in the Catalog.getPageDict method (PR 14338 follow-up)
#14386 Ignore negative /FitH parameters in the viewer (issue 14385)
#14373 [api-minor] Fix broken/missing JSDocs and typedefs, to allow updating TypeScript to the latest version (issue 14342)
#14387 Modernize the test utilities

Don't miss a new pdfjs-dist release

NewReleases is sending notifications on new releases.