github mozilla/pdf.js v2.6.347

latest releases: v4.4.168, v4.3.136, v4.2.67...
3 years ago

This release features support for form filling (AcroForm) and layers (optional content). Moreover, the default viewer is redesigned to match Firefox's Photon design, TypeScript definitions are shipped and various performance improvements and bugfixes are included.

Changes since v2.5.207:

#11948 Bump versions in pdfjs.config and update the getting started page of the website for the new release
#11958 [api-minor] Remove the deprecated PDFDocumentProxy.getOpenActionDestination method (PR 11644 follow-up)
#11967 Do not transform jpeg RGB components
#11964 Fix pdfjs-dist/webpack causing errors with certain configs
#11953 For #11838: trigger fallback bar after user clicks in pdf
#11972 Change the loadedChunks property, on ChunkedStream instances, from an Array to a Set
#11963 Avoid calling Math.pow if possible.
#11974 A couple of small image caching/sending improvements
#11976 Remove unused methods from NetworkManager, in src/display/network.js
#11978 Improve unit test coverage for primitives
#11977 Convert the RefSet primitive to a proper class and use a Set internally
#11985 Convert some Objects to Maps in ChunkedStreamManager, and move the isEmptyObj helper function to the test utils
#11987 Update SVGGraphics to account for globally cached images (PR 11912 follow-up)
#11992 Prevent the (old) preprocessor from appending trailing whitespace when removing closing HTML comments
#11993 Change the dependencies property, on OperatorList instances, from an Object to a Set
#11969 For #11961: collect telemetry on all unique unsupported features that…
#11997 Add basic support for the nullish coalescing operator ??
#11999 Update packages and translations
#12000 Ensure that PDFImage.buildImage won't accidentally swallow errors, e.g. from ColorSpace parsing (issue 6707, PR 11601 follow-up)
#12001 Add local caching of ColorSpaces, by name, in PartialEvaluator.getOperatorList (issue 2504)
#12002 Small improvements in CFFCompiler.encodeNumber and CFFCompiler.encodeFloat
#12004 Convert the code in src/core/worker.js to use ES6 classes
#12005 Convert the code in src/core/cff_parser.js to use ES6 classes
#12017 Convert the PDFPageProxy.intentStates property from an Object to a Map
#12016 Tweak the QueueOptimizer to recognize OPS.paintImageMaskXObject operators as repeated when the "skew" transformation matrix elements are non-zero (issue 8078)
#12021 Move the fetchBuiltInCMap method to the PartialEvaluator.prototype
#12012 Improve (local) caching of parsed ColorSpaces (PR 12001 follow-up)
#12024 Update Needle to 2.5.0 or greater.
#12028 Attempt to detect inline images which contain "EI" sequence in the actual image data (issue 11124)
#12032 Update packages and translations
#12041 Replace Mozilla Labs by just Mozilla
#12049 Enable the no-promise-executor-return ESLint rule
#12036 Add at least some test-coverage for the RenderTask.onContinue functionality
#12043 Add a reduced test-case for issue 4260 (PR 4521 follow-up)
#12044 Adjust the heuristics used when dealing with rectangles, i.e. re operators, with zero width/height (issue 12010)
#12040 Replace non-inclusive "whitelist" term with "allowlist"
#12039 [api-minor] Use the NodeCanvasFactory/NodeCMapReaderFactory classes as defaults in Node.js environments (issue 11900)
#12034 Add local caching of Functions, by reference, in the PDFFunctionFactory (issue 2541)
#12057 Allow BaseLocalCache to, optionally, only allocate storage for caching of references (PR 12034 follow-up)
#12059 Convert the code in src/core/image.js to use ES6 classes
#12060 Convert the code in src/core/evaluator.js to use standard classes
#12072 Bump npm from 6.14.5 to 6.14.6
#12056 Refactor/simplify the "delayedFallback" handling in the default viewer
#12070 Re-factor the idFactory functionality, used in the core/-code, and move the fontID generation into it
#12083 Remove the IR (internal representation) part of the ColorSpace parsing
#12063 Tweak the heuristic, in src/core/jpg.js, that handles JPEG images with a wildly incorrect SOF (Start of Frame) scanLines parameter (issue 10989)
#12092 Update packages and translations
#12090 Stop special-casing the (very unlikely) "no /XObject found"-scenario, when parsing OPS.paintXObject operators, in PartialEvaluator.{getOperatorList, getTextContent}
#12099 Use a RefSet, rather than a plain Object, for tracking already processed nodes in PartialEvaluator.hasBlendModes
#12085 Make the detection of Node.js environments on Electron strict.
#12089 Convert RefSetCache to a proper class and to use a Map internally
#12087 Add local caching of "simple" Graphics State (ExtGState) data in PartialEvaluator.{getOperatorList, getTextContent} (issue 2813)
#12101 Add a new size getter and getRawValues method, to Dict instances, to simplify some code
#12023 Fix auto-rotate for printing landscape PDFs where the first page is also landscape
#12114 Remove a couple of unnecessary PDFJSDev checks from the viewer
#12106 [api-minor] Add an annotation storage in order to save annotation data in acroforms
#12122 Update packages and translations
#12124 Include the browser name when printing unit-test results
#12126 Attempt to reduce intermittent failures in the "cleans up document resources during rendering of page" unit-test
#12125 Improve test bot stability
#12127 Improve how Type3-fonts with dependencies are handled
#12135 [src/core/worker.js] Remove a useless Promise handler from the pdfManagerReady function
#12136 Ignore fetch() errors, in PDFFetchStreamRangeReader, once the request has been aborted
#12107 Add support for checkboxes printing
#12143 Fix hanging reference test (PR 12107 follow-up)
#12141 Populate the find field with the search query when URL has #search hash
#12147 [api-minor] Fix the AnnotationStorage usage properly in the viewer/tests (PR 12107 and 12143 follow-up)
#12144 Prevent Uncaught (in promise) AbortException when running the unit-tests
#12148 Revert "Populate the find field with the search query when URL has #search hash"
#12131 [api-minor] Allow loading pdf fonts into another document.
#12151 Revert "[api-minor] Allow loading pdf fonts into another document."
#12153 Unit test improvements
#12108 Add support for radios printing
#12102 Add types annotations
#12162 Tweak for the type of PageViewportParameters.viewBox (PR 12102 follow-up)
#12161 Add types to functions exported as API in src/pdf.js (PR 12102 follow-up)
#12157 Fix the type of SVGGraphics (PR 12102 follow-up)
#12160 Use typedef to define the type of GlobalWorkerOptions (PR 12102 follow-up)
#12095 Add support for optional marked content.
#12156 Improve the types generation and API documentation (PR 12102 follow-up)
#12163 Re-factor the dispatching of "attachmentsloaded" events, when the PDF document contains no "regular" attachments
#12171 Attempt to reduce intermittent failures in the "multiple render() on the same canvas" unit-test
#12168 Fix the gulp types task to run on Windows, and place the TypeScript definitions correctly in pdfjs-dist
#12172 Fix the type definition of TypedArray. (PR 12156 follow-up)
#12174 Do the AppOptions.get("printResolution") lookup once in web/app.js , when initializing PDFPrintServiceFactory-instances, rather than for every printed page
#12173 [api-minor] Fix the annotationStorage parameter in PDFPageProxy.render
#12179 Add support for Object.fromEntries
#12169 Extract common methods from PDFOutlineViewer/PDFAttachmentViewer into a new abstract BaseTreeViewer class
#12175 Support textfield and choice widgets for printing
#12182 Fix the type of PDFDocumentLoadingTask.destroy.
#12154 [api-minor] Allow loading pdf fonts into another document.
#12187 Add a test-case for issue 4398
#12188 Update packages and translations
#12176 Support multiline textfields for printing
#12177 Support comb textfields for printing
#12186 Fix bad truetype loca tables.
#12192 A couple of (small) tweaks of the AnnotationStorage (PR 12173 follow-up)
#12193 Set direction: ltr; on the canvases used during printing (bug 1335712)
#12191 Remove the disableCreateObjectURL option from web/app_options.js
#12137 Add support for saving forms
#12201 Enable renderInteractiveForms by default.
#12211 Wait until saving has finished before resetting PDFViewerApplication._saveInProgress (PR 12137 follow-up)
#12212 Bug 1643508 - Disable touch-based pinch zooming on pdf.js.
#12210 Keep the original class/function names when minifying code (issue 12209)
#12203 Bug 1392361 - Fix zooming sensitivity on macOS
#12219 Add (basic) support for transfer functions to Images (issue 6931, bug 1149713)
#12227 Include image_decoders-es5/minified-es5 in the pdfjs-dist library (issue 12220)
#12229 Dispatch event when annotations have finished rendering.
#12230 Implement reference testing for printing
#12250 Update the zoom dropdown width calculation to work better in locales with long zoom-strings (PR 11077 follow-up)
#12251 Return the query with the findcontrolstate
#12241 confirm if leaving a modified form without saving
#12248 Support file save triggered from the Firefox integrated version.
#12247 Improve the field value parsing for choice widgets to handle null values
#12256 #12241 followup - move event listener to PDFViewerApplication.load
#12244 fix webpack config problem caused by breaking changes of worker-loader
#12260 Replace menu dropdown icon
#12261 Also enable renderInteractiveForms by default in the viewer components (PR 12201 follow-up)
#12265 Don't warn when navigating away from a modified form, if printing has occurred (issue 12262)
#12267 Update packages and translations
#12263 Fix AcroForm printing/saving edge cases
#12268 Reduce the leading padding for the numPages span (PR 11077 follow-up)
#12270 Accent positioning in Type1 seac glyphs
#12276 Access the XRef/Catalog data correctly in the "GetStats"/"GetPageIndex" handlers in src/core/worker.js
#12271 Improve AcroForm/XFA form type detection
#12285 Ensure that the sourceEventType parameter is actually optional in PDFViewerApplication.{download, save} (PR 12248 follow-up)
#12286 Use a link, rather than, when opening PDF attachments in Firefox (bug 1661259)
#12293 Download, rather than opening, PDF attachments in Firefox (bug 1661259, PR 12286 follow-up)
#12287 Bug 1661226 - Push button are not rendered with renderInteractiveForms enabled
#12298 Tweak the vertical positions of the findbar and secondaryToolbar (PR 11077 follow-up)
#12259 Fix handling of symbolic fonts and unicode cmaps.
#12300 Fix various :hover effects in the findbar (PR 11077 follow-up)
#12299 Update the indeterminate progressBar to the new design (PR 11077 follow-up)
#12170 [api-minor] Add support for toggling of Optional Content in the viewer (issue 12096)
#12301 Add (basic) support for Stylelint, to allow linting of CSS files
#12296 Add support, in Dict.merge, for merging of "sub"-dictionaries
#12310 Add support for /Print and /SaveAs named actions in the viewer (issue 12308)
#12315 print: Make the firefox printing code able to fail and be re-invoked.
#12321 Ensure that the viewer property, on BaseViewer-instances, is a valid div-element (issue 12320)

Don't miss a new pdf.js release

NewReleases is sending notifications on new releases.