github mozilla/pdf.js v2.11.338

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

This release features improved XFA support (enabled by default now), improved annotations/forms support and other bugfixes and optimizations.

Changes since v2.10.377:

#13793 Bump versions in pdfjs.config
#13792 Remove the remaining closure in the src/display/canvas.js file
#13795 XFA - Elements created outside of XML must have all their properties (bug 1722029)
#13801 Access navigator safely in the src/display/annotation_layer.js file
#13804 Move the compatibilityParams into the web/app_options.js file
#13807 XFA - Get the full value when binding and not only the 1st line (bug 1718725)
#13796 Allow StreamsSequenceStream.readBlock to skip sub-streams with errors (issue 13794)
#13806 XFA - Fix auto-sized fields (bug 1722030)
#13815 XFA - Fix font scale factors (bug 1720888)
#13808 Improve caching of shading patterns. (bug 1721949)
#13819 XFA - Avoid an error when an exdata is a string (bug 1723114)
#13816 [api-minor] Remove the separate enableScripting option in BaseViewer
#13813 Remove a couple of closures in the src/display/api.js file
#13822 Prevent "Uncaught promise" messages in the console when cancelling (some) ReadableStreams
#13824 When no "V" entry exists, let the fieldValue fallback to the "DV" entry (issue 13823)
#13828 Introduce the GitHub Advanced Security workflow
#13830 Improve the code analysis workflow with quality checks
#13833 Make worker-loader optional as peerDependencies. Close #13825.
#13836 Fix inefficient regular expressions in external/cmapscompress/parse.js
#13831 Change the parseQueryString function to return a Map rather than an Object (issue 13829)
#13837 Implement unit tests for the parseQueryString utility function
#13839 Fix a broken regular expression in the docId unit-test (issue 13838, PR 13813 follow-up)
#13841 Allow customization of theme in Chrome extension + set default theme
#13842 Visually hide br in text selections
#13847 Remove useless assignment of availableSpace in the src/core/xfa/template.js file (issue 13829, 13835)
#13852 XFA - Page can be too small when printing (bug 1723705)
#13860 Bump tar from 4.4.8 to 4.4.15
#13859 Remove the isEOF helper function and slightly re-factor EOF
#13848 Remove the LGTM configuration and inline disable comments (issue 13829)
#13854 Prevent breaking errors when an optional content group is undefined (issue 13851)
#13846 Add a special gulp xfatest command, to limit the ref-tests to only XFA-documents (issue 13744)
#13858 Add aria-labels to XFA form elements. (bug 1723422)
#13864 [XFA] Add alt text for images. (bug 1723418)
#13856 XFA - Avoid to put something in very small areas
#13868 Annotation & XFA: Scale the font size in choicelist using zoom factor (bug 1715996)
#13875 Annotation & XFA: Add focus outlines on different fields (bug 1723615, bug 1718528)
#13869 Enable linting in the test/resources/ folder, and fix the "Remote property injection" warning (issue 13862)
#13874 Update the Annotation --zoom-factor CSS variable when PDFPageView is used standalone (PR 13868 follow-up)
#13873 XFA - Support aria heading and table structure. (bug 1723421) (bug 1723425)
#13880 Fix typo in cff_parser_spec.js
#13881 XFA - Elements under an area must be bound (bug 1723734)
#13879 Fix the global variable definitions in test/resources/reftest-analyzer.js (issue 13862)
#13867 [api-minor] Re-factor the internal renderingIntent, and change the default intent value in the PDFPageProxy.getAnnotations method
#13882 [api-minor] Remove the closure from the PDFWorker class, in the src/display/api.js file
#13883 Improve caching of Annotations-data, by using a Map, in the API
#13884 Update packages and translations
#13887 Bump path-parse from 1.0.5 to 1.0.7
#13890 Update some deprecated ESLint rules
#13886 Re-factor the handling, and clean-up some code
#13896 Simplify the ReadableStream polyfill
#13892 Move some validation, in Dict.merge, used during merging of sub-dictionaries (PR 13775 follow-up)
#13900 [api-minor] Stop translating logical assignment in non-legacy builds (PR 12887 follow-up)
#13911 Ensure that the TESTING define can always be overridden in gulpfile.js
#13913 Fix pdf_viewer definitions
#13905 Re-factor loadAndEnablePDFBug and PDFBug.init
#13904 Re-factor the LocalTilingPatternCache to cache by Ref rather than Name (PR 12458 follow-up, issue 13780)
#13899 [Regression] Re-factor the internal includeAnnotationStorage handling, since it's currently subtly wrong
#13920 Extend the glyph maps for standard respectively Calibri fonts (issue 13916)
#13921 Update packages and translations
#13922 Enable the ESLint object-shorthand rule in the extensions/chromium/-folder
#13908 [api-minor] XFA - Support text search in XFA documents.
#13923 [api-minor] Introduce a new annotationMode-option, in PDFPageProxy.{render, getOperatorList}
#13934 Remove the IPDFHistory interface
#13935 A couple of small TextHighlighter/TextLayerBuilder tweaks (PR 13908 follow-up)
#13939 Remove the npm test-command
#13930 Fix Viewer API definitions and include in CI
#13940 Simplify the PDFViewerApplication.supportsFullscreen getter
#13933 Fix saving of XFA checkboxes. (bug 1726381)
#13941 Ensure that PasswordException is handled correctly in the wrapReason function
#13942 Export the XFA/StructTree-layers in the viewer components
#13943 Use async a bit more in the API
#13944 Re-factor the setPDFNetworkStreamFactory usage for the unit-tests (PR 13549 follow-up)
#13937 Fix handling of fetch errors
#13932 Support Optional Content in Image-/XObjects (issue 13931)
#13949 Only use base encoding if it's populated. (bug 1727053)
#13951 Bump tar from 4.4.15 to 4.4.19
#13945 Implement PDFNetworkStreamRangeRequestReader._onError, to handle range request errors with XMLHttpRequest (issue 9883)
#13952 Extend getNonStdFontMap for non-embedded versions of the ItcSymbol font (issue 11532)
#13955 Always prefer the post-table for TrueType fonts with (0, x) cmap-tables (issue 13433)
#13959 Correctly pad strings when saving an encrypted pdf (bug 1726789)
#13967 XFA - Overwrite AcroForm dictionary when saving if no datasets in XFA (bug 1720179)
#13966 XFA - Created data node mustn't belong to datasets namespace
#13970 Fallback to the /ToUnicode map for TrueType fonts with (3, 1) and (1, 0) cmap-tables (issue 13316)
#13961 Simplify some regular expressions
#13973 [api-minor] Change {PDFPageView, PDFThumbnailView}.update to take a parameter object
#13972 Treat all content as visible when no optional content groups are defined (issue 13971)
#13975 Update packages and translations
#13976 Reduce the size of TextLayerRenderTask._textDivProperties in "regular" text-selection mode
#13988 Avoid an error in integration test because of a locale different of en-US
#13985 Improve glyph mapping for non-embedded composite standard fonts (issue 11088)
#13992 XFA - Remove the checked attribute from the checkbox when unchecked (bug 1729877)
#13995 XFA - Handle $record shorcut in SOM expression (issue #13994)
#13996 Make verifyManifestFiles fail for non-linked test-cases with a "link": true-entry
#13991 Enable/disable image smoothing based on image interpolate value. (bug 1722191)
#14000 Re-factor the CSS_PIXELS_PER_INCH/PDF_PIXELS_PER_INCH exports (PR 13991 follow-up)
#13993 Don't create PDFViewerApplication.pdfHistory when the browsing history is disabled
#13977 [api-minor] Reduce postMessage overhead, in PartialEvaluator.getTextContent, by sending text chunks in batches (issue 13962)
#13983 Update the learning/ examples with basic HiDPI-screen support
#14004 [CRX] enableScripting=false by default in Chrome extension
#14002 Let Lexer.getObj return a dummy-Cmd for commands that start with a non-visible ASCII character (issue 13999)
#13998 Write boolean value when saving a form (bug 1729971)
#14006 [src/core/writer.js] Remove unnecessary string-wrapping for boolean values in writeValue (PR 13998 follow-up)
#14007 [src/core/writer.js] Support null values in the writeValue function
#14018 XFA - Don't create images for unsupported mime types
#14027 Annotation - Checkboxes with the same name and export values must be in unison
#14028 Use CSS variables for setting the width of the zoom dropdown (PR 11570 follow-up)
#13984 Enable XFA by default in the viewer, and components/ examples (issue 13968)
#14025 Improve glyph mapping for non-embedded composite standard fonts with a /CIDToGIDMap (issue 11915)
#14035 Annotation - For checkboxes, get field value from AS (if any) instead of V (bug 1722036)
#14040 JS - Avoid the Stay/Leave popup when clicking on a button with a JS action
#14038 JS - Implement few possibilities with app.execMenuItem (bug 1724399)
#14043 Re-factor the EventBus and isInAutomation handling (PR 11655 follow-up)
#14013 Improve the API unit-tests, and try to expose more API-functionality in the TypeScript definitions
#14045 XFA - Only warn about the wrong xfa type when there is an xfa thing
#14005 [GENERIC viewer] Always show the Download-buttons, to allow saving of forms (issue 13997)
#14044 Annotations - Avoid empty value in text field when storage contains something for it (bug 1719148)
#14041 Support cmaps with only CID characters, when building the ToUnicode-map (issue 9367)
#14052 Update packages and translations
#14050 Tweak how fonts with an /Encoding are handled in adjustToUnicode (issue 14048, PR 13277 follow-up)
#14053 Move the zoomIn/zoomOut functionality into BaseViewer (PR 14038 follow-up)
#14056 Correctly validate URLs in XFA documents (bug 1731240)
#14055 Add PDF_TO_CSS_UNITS to the PixelsPerInch-structure
#14058 [api-minor] Change EventBus.dispatch to only support one data-argument
#14063 [GENERIC viewer] Warn about AppOptions being overridden by Preferences during loading
#14023 Re-factor document.getElementsByName lookups in the AnnotationLayer (issue 14003)
#14066 Print a special warning message, in the viewer, for XFA Foreground documents
#14068 Fix typo "_annotatationMode" => "_annotationMode"
#14067 Don't save anything in XFA entry if no XFA! (bug 1732344)
#14042 Fix dialogs with forced colors (bug 1722984)
#14072 XFA - Create a new page in case of overflow
#14073 XFA - Bind items when there's a bindItems entry
#14069 Mark the paintJpegXObject operator as deprecated (PR 11601 follow-up)
#14070 Some small readability improvements in the MessageHandler code
#14065 [api-minor] Stop exporting, by default, a few additional Font properties (PR 11777 follow-up)
#14074 [api-minor] Add basic support for RTL text-content in PopupAnnotations (issue 14046)
#14064 Fallback to font name matching, when checking for serif fonts (issue 13845)
#14036 Annotation - Some checkboxes have an empty N dictionary
#14077 Fix issues in driver.js when getting css sheets
#14076 XFA - Add element in button when an url is detected (bug 1716758)
#14081 [api-minor] Move the addDefaultProtocolToUrl/tryConvertUrlEncoding functionality into the createValidAbsoluteUrl function
#14049 Annotation - Use border and background colors from MK dictionary
#14091 Add the missing pdf file for the test in the PR #14049
#14083 AcroForm: Add support for ResetForm action
#14095 Replace a couple of Array.prototype.forEach-invocations with for..of instead
#14057 Support CMap-data with only strings, when parsing TrueType composite fonts (bug 920426)
#14092 [api-minor] Ensure that various URL-related options are applied in the xfaLayer too
#14096 Pre-render one additional page when spreadModes are enabled

Don't miss a new pdf.js release

NewReleases is sending notifications on new releases.