Changelog History
Page 1
-
v2.6.347 Changes
September 03, 2020π 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 deprecatedPDFDocumentProxy.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 theloadedChunks
property, onChunkedStream
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 fromNetworkManager
, insrc/display/network.js
β #11978 Improve unit test coverage for primitives
#11977 Convert theRefSet
primitive to a proper class and use aSet
internally
π #11985 Convert someObject
s toMap
s inChunkedStreamManager
, and move theisEmptyObj
helper function to the test utils
β‘οΈ #11987 UpdateSVGGraphics
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 thedependencies
property, onOperatorList
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 thatPDFImage.buildImage
won't accidentally swallow errors, e.g. from ColorSpace parsing (issue 6707, PR 11601 follow-up)
#12001 Add local caching ofColorSpace
s, by name, inPartialEvaluator.getOperatorList
(issue 2504)
#12002 Small improvements inCFFCompiler.encodeNumber
andCFFCompiler.encodeFloat
π· #12004 Convert the code insrc/core/worker.js
to use ES6 classes
π #12005 Convert the code insrc/core/cff_parser.js
to use ES6 classes
#12017 Convert thePDFPageProxy.intentStates
property from anObject
to aMap
#12016 Tweak theQueueOptimizer
to recognizeOPS.paintImageMaskXObject
operators as repeated when the "skew" transformation matrix elements are non-zero (issue 8078)
π #12021 Move thefetchBuiltInCMap
method to thePartialEvaluator.prototype
π #12012 Improve (local) caching of parsedColorSpace
s (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 theno-promise-executor-return
ESLint rule
#12036 Add at least some test-coverage for theRenderTask.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"
0οΈβ£ #12039 [api-minor] Use theNodeCanvasFactory
/NodeCMapReaderFactory
classes as defaults in Node.js environments (issue 11900)
#12034 Add local caching ofFunction
s, by reference, in thePDFFunctionFactory
(issue 2541)
#12057 AllowBaseLocalCache
to, optionally, only allocate storage for caching of references (PR 12034 follow-up)
#12059 Convert the code insrc/core/image.js
to use ES6 classes
#12060 Convert the code insrc/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 theidFactory
functionality, used in thecore/
-code, and move thefontID
generation into it
π #12083 Remove the IR (internal representation) part of the ColorSpace parsing
#12063 Tweak the heuristic, insrc/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 parsingOPS.paintXObject
operators, inPartialEvaluator.{getOperatorList, getTextContent}
#12099 Use aRefSet
, rather than a plain Object, for tracking already processed nodes inPartialEvaluator.hasBlendModes
#12085 Make the detection of Node.js environments on Electron strict.
#12089 ConvertRefSetCache
to a proper class and to use aMap
internally
#12087 Add local caching of "simple" Graphics State (ExtGState) data inPartialEvaluator.{getOperatorList, getTextContent}
(issue 2813)
#12101 Add a newsize
getter andgetRawValues
method, toDict
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 unnecessaryPDFJSDev
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 thepdfManagerReady
function
#12136 Ignorefetch()
errors, inPDFFetchStreamRangeReader
, 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 theAnnotationStorage
usage properly in the viewer/tests (PR 12107 and 12143 follow-up)
β #12144 PreventUncaught (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 thegulp types
task to run on Windows, and place the TypeScript definitions correctly inpdfjs-dist
#12172 Fix the type definition of TypedArray. (PR 12156 follow-up)
π¨ #12174 Do theAppOptions.get("printResolution")
lookup once inweb/app.js
, when initializingPDFPrintServiceFactory
-instances, rather than for every printed page
#12173 [api-minor] Fix theannotationStorage
parameter inPDFPageProxy.render
π #12179 Add support forObject.fromEntries
#12169 Extract common methods fromPDFOutlineViewer
/PDFAttachmentViewer
into a new abstractBaseTreeViewer
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 theAnnotationStorage
(PR 12173 follow-up)
π¨ #12193 Setdirection: ltr;
on the canvases used during printing (bug 1335712)
π #12191 Remove thedisableCreateObjectURL
option fromweb/app_options.js
π #12137 Add support for saving forms
0οΈβ£ #12201 Enable renderInteractiveForms by default.
#12211 Wait until saving has finished before resettingPDFViewerApplication._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 Includeimage_decoders-es5
/minified-es5
in thepdfjs-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 handlenull
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
0οΈβ£ #12261 Also enablerenderInteractiveForms
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 thenumPages
span (PR 11077 follow-up)
#12270 Accent positioning in Type1seac
glyphs
π· #12276 Access theXRef
/Catalog
data correctly in the "GetStats"/"GetPageIndex" handlers insrc/core/worker.js
#12271 Improve AcroForm/XFA form type detection
#12285 Ensure that thesourceEventType
parameter is actually optional inPDFViewerApplication.{download, save}
(PR 12248 follow-up)
#12286 Use a link, rather thanwindow.open
, 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 thefindbar
andsecondaryToolbar
(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, inDict.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 theviewer
property, onBaseViewer
-instances, is a valid div-element (issue 12320) -
v2.5.207 Changes
June 01, 2020π This release features performance improvements thanks to improved image caching and JPEG decoding.
π Changes since v2.4.456:
π #11717 Bump versions in
pdfjs.config
and update the getting started page of the website for the new release
π #11719 Remove the unusedwideChars
property onFont
instances
β‘οΈ #11720 Update theeslint-plugin-no-unsanitized
package to the latest version
β‘οΈ #11721 Don't let Travis runnpm update
during setup
π #11728 Remove unnecessary checks from thePDFDocumentProperties
constructor
π #11724 Only build the necessaryweb/
files during thegulp default_preferences
task
π #11723 Remove variable shadowing from the JavaScript files in thesrc/display/
folder
#11725 Re-factorPDFViewerApplication.load
such that{PDFViewer, PDFThumbnailViewer}.setDocument
happens slightly earlier
π #11734 Remove old API methods which were previously converted to throwing (PR 11219 follow-up)
#11736 Addpassive: false
to thewheel
event listener used inPDFPresentationMode
(issue 11735, PR 10765 follow-up)
π #11742 Remove variable shadowing from the JavaScript files in thetest/unit/
folder
π #11738 Remove variable shadowing from the JavaScript files in thesrc/core/
folder
#11707 Always prefer the PDF.js JPEG decoder for very large images, in order to reduce peak memory usage (issue 11694)
#11744 The first glyph in CFF CIDFonts must be named 0 instead of ".notdef"
π¨ #11646 Ensure that automatic printing still works when the viewer and/or its pages are hidden (bug 1618621, bug 1618955)
#11747 Addpassive: false
when removing wheel listeners
π #11745 Enable the ESLintno-shadow
rule
π #11755 Remove the unusedsizes
andencoding
properties onFont
instances
#11767 Replace the RTL images with CSS transforms of the standard images (issue 11766)
π #11655 [api-minor] Remove thegetGlobalEventBus
viewer functionality, and theeventBusDispatchToDOM
option/preference (PR 11631 follow-up)
π #11771 Fail early, in modernGENERIC
builds, if certain required browser functionality is missing (issue 11762)
β‘οΈ #11772 Update packages and translations
#11769 Ensure thatFont.charToGlyph
won't fail becauseString.fromCodePoint
is given an invalid code point (issue 11768)
β‘οΈ #11781 Update the "gulp jsdoc" task to account for API changes in themkdirp
package (PR 11772 follow-up)
π #11780 Move the initialization of "page labels"/"metadata"/"auto print" out ofPDFViewerApplication.load
#11773 [api-minor] ChangeFont.exportData
to use an explicit white-list of exportable properties, and stop exporting internal/unused properties
0οΈβ£ #11777 [api-minor] ChangeFont.exportData
to, by default, stop exporting properties which are completely unused on the main-thread and/or in the API (PR 11773 follow-up)
#11746 Create the glyph mapping correctly for composite Type1, i.e. CIDFontType0, fonts (issue 11740)
#11727 Add a heuristic to scale even single-char text, when the horizontal/vertical scaling differs significantly (issue 11713)
0οΈβ£ #11789 Add a newpdfjs.enablePermissions
preference, off by default, to allow the PDF documents to disable copying in the viewer (bug 792816)
#11797 Don't bundle the fallbackgrab
/grabbing
cursor images when runninggulp mozcentral
π #11799 Fail early, in modernGENERIC
builds, if certain required browser functionality is missing (PR 11771 follow-up)
π #11800 Remove any mention of Gitpod from the README (issue 11732)
β‘οΈ #11809 Update Prettier to version 2.0
#11806 [api-minor] Fix the return value ofPDFDocumentProxy.getViewerPreferences
when no viewer preferences are present (PR 10738 follow-up)
#11810 A couple of smallString.fromCodePoint
improvements (PR 11698 and 11769 follow-up)
#11805 Always skip over any additional, unexpected, RSTx (restart) markers in corrupt JPEG images (issue 11794)
π» #11813 Suppress browser autofill on page number
π #11821 docs: Fix simple typo, occurences -> occurrences
π #11819 [src/core/jpg.js] Remove redundant marker validation at the end of thedecodeScan
function (PR 11805 follow-up)
π #11818 Enable thedot-notation
ESLint rule
π #11814 Support the vertical writing mode with SVG backend.
β‘οΈ #11822 Update packages and translations
π #11826 Change the "download" keyboard shortcut (Ctrl+S) handling, in GENERIC/CHROME builds, to utilize theEventBus
(issue 11657); add a new "openfile" keyboard shortcut (Ctrl+O), in GENERIC builds
#11823 [src/core/fonts.js] Improve thevalidateOS2Table
function and other code
π #11825 Avoid reading the "disablePreferences"/"locale" options, when initializing the viewer, in extension builds
π #11831 Use Node LTS releases to fix Travis CI builds (issue 10790)
#11835 [api-minor] ChangePageViewport
to throw when therotation
is not a multiple of 90 degrees
#11837 Always attempt to dispatch the "webviewerloaded" event at the embeddingdocument
(PR 10318 follow-up, issue 11829)
π #11844 [api-minor] Immediately release thefont.data
property once the font been attached to the DOM (PR 11777 follow-up)
π #11845 Use the nativeURL.createObjectURL
method more in theweb/
folder
π #11847 Move themaybeValidDimensions
check, used with JPEG images, to occur earlier (PR 11523 follow-up)
β #11807 Introduce Puppeteer for handling browsers during tests
#11853 Include the name for interactive form elements
π #11834 Preserve error types during translation
π #11864 Remove thecreate-react-app
example (issue 11729)
β‘οΈ #11868 Update packages and translations
#11869 Various smaller clean-up ingulpfile.js
π #11863 Add more categories of unsupported features.
π #11872 Gracefully handle annotation parsing errors inPage.getOperatorList
(issue 11871)
π #11879 Enable the ESLintgrouped-accessor-pairs
rule
π #11873 Use the ESLintno-restricted-syntax
rule to ensure thatassert
is always called with two arguments
#11880 Attempt to respect the "zoom" hash parameter, even when the "nameddest" parameter is present (issue 11875)
π #11889 Handle errors individually for each annotation in the_parsedAnnotations
getter
β‘οΈ #11890 Update ESLint to version 7
#11892 Add aminified-es5
gulp task (issue 11858)
#11905 Reduce the usage ofrequire
statements in code-paths not protected by pre-processor and/or run-time checks
β‘οΈ #11910 Update packages and translations
π #11911 Remove the SystemJS dependency from theweb/preferences.js
file
π» #11917 [Firefox] Allow PDF attachments to, once again, be opened directly in the browser (bug 1632644)
π· #11914 Convert thesrc/pdf.js
andsrc/pdf.worker.js
files to use standardimport
/export
statements
#11919 Reduce usage of SystemJS, in the development viewer, even further
#11912 Attempt to cache repeated images at the document, rather than the page, level (issue 11878)
π· #11924 Avoid hanging the worker-thread for CMap data with ridiculously large ranges (issue 11922)
π #11926 AllowGlobalImageCache.clear
to, optionally, only remove the actual data (PR 11912 follow-up)
#11601 [api-minor] Decode all JPEG images with the built-in PDF.js decoder insrc/core/jpg.js
#11927 Implement fill opacity for shading patterns in the SVG back-end
β‘οΈ #11939 Update Acorn to version 7
#11940 Add comments to theexport
list in thesrc/pdf.js
file (PR 11914 follow-up)
#11930 Improve the local image caching inPartialEvaluator.getOperatorList
π #11943 Remove unused code from theexternal/builder/builder.js
file
β‘οΈ #11945 Update packages and translations
#11947 Ensure that that we don't attempt to cache inline images in theGlobalImageCache
(PR 11912 follow-up) -
v2.4.456 Changes
March 19, 2020π From now on we produce a non-translated/non-polyfilled build for modern browsers by default. However, we also provide the translated/polyfilled build for older browsers in a separate bundle (with the
-es5-dist.zip
suffix).π Changes since v2.3.200:
#11202 Bump versions in
pdfjs.config
#11198 [PDFSidebarResizer] Add a couple of (small) readability improvements in the code
#11212 [MessageHandler] Some additional (small) clean-up of the code
β‘οΈ #11213 Update thegulp importl10n
command to fetch the active language codes
#11186 Improve the heuristics, inPartialEvaluator._buildSimpleFontToUnicode
, for glyphNames of the Cdd{d}/cdd{d} format (issue 9655)
#11209 Use square brackets for optional properties in the JSDoc comments ofsrc/display/api.js
π #11222 Remove locales which are unmaintained and/or not shipping in Nightly (PR 11213 follow-up)
π #11219 [api-minor] Replace alldeprecated
calls with throwing of actualError
s
0οΈβ£ #11218 Attempt to fallback to a default font, for non-available ones, inPartialEvaluator.loadFont
#11220 Added create react app example with typescript and basic usage
π #11228 Enable the ESLint ruleaccessor-pairs
for Classes
π #11232 Cache processed 'ExtGState's inPartialEvaluator.hasBlendModes
to avoid unnecessary parsing/lookups
β #11234 Convert a number of reference tests, for documents with corrupt XRef tables, fromload
toeq
β‘οΈ #11237 Updatesrc/shared/compatibility.js
to only run withSKIP_BABEL = false
set
#11235 Improve the JSDoc comments
π #11246 Tweak theisIOS
check, inweb/viewer_compatibility
, to attempt to support newer Safari versions (issue 11245)
#11247 Change variable assignment
#11253 Avoid handling keyboard shortcuts forcontentEditable
DOM elements (issue 7156)
π #11250 Silence the Autoprefixer message being printed with all build logs
π #11256 [Firefox] Remove unused addonl10n
files (PR 9566 follow-up)
β‘οΈ #11257 Remove/updateskipPages
annotations fromtest/test_manifest.json
#11231 Allow over-writing entries, inXRef.indexObjects
, only when the generation number matches (issues 11230, 11139, 9552, 9129, 7303)
β‘οΈ #11260 Update npm packages
#11243 Add a fallback for non-embedded composite Verdana fonts (issue 11242)
π· #11261 Re-factor sending of various Exceptions from the worker to the API
π #11262 Re-add the en-USchrome.properties
l10n file, to avoid it being removed at mozilla-central (PR 11256 follow-up)
#11263 Attempt to reduce resource usage, by not eagerly fetching all pages, for long/large documents
π¨ #11268 refactor: viewer.css refactored, duplications removed
π #11271 Re-factorStatTimer
usage, insrc/display/api.js
, and removeDummyStatTimer
π― #11273 [api-minor] Support customoffsetX
/offsetY
values inPDFPageProxy.getViewport
andPageViewport.clone
β‘οΈ #11282 Update l10n files
π #11281 Support Blend Modes which are specified in an Array of Names (issue 11279)
#11283 Ensure thatPartialEvaluator.hasBlendModes
handles Blend Modes in Arrays (PR 11281 follow-up)
#11284 Make theObjectLoader
use more efficient methods when determining if data needs to be loaded
π #11294 Remove some unusedrequire
statements, used when loading fake workers, in non-PRODUCTION
mode
#11290 [MessageHandler] Re-factor and convert the code to a properclass
#11301 Ensure that thepeekByte
methods, on the various Streams, handles end of data correctly (PR 5286 follow-up)
π #11296 Allow skipping of errors when parsing broken/unsupported ColorSpaces (issue 6707, issue 11287)
#11302 Slightly re-factor setting of the linktarget
inaddLinkAttributes
#11304 Re-factor theObjectLoader._walk
method to be properly asynchronous
π #11307 Support UTF-16 little-endian strings in thestringToPDFString
helper function (bug 1593902)
π» #11308 Prevent browser exceptions from incorrectly triggering theassert
inPDFPageProxy._abortOperatorList
(PR 11069 follow-up)
#11312 ConvertCatalog.getPageDict
to anasync
method
βͺ #11314 Revert "ConvertCatalog.getPageDict
to anasync
method"
#11313 Ensure that Popup annotations, where the parent annotation is a polyline, will always be possible to open/close (issue 11122)
π» #11305 Fix nodejs core module : ignore url module for web browser
β #11315 Include a reduced test case for annotations without aBorder
/BS
entry (PR 6180 follow-up)
#11300 Simplifies code contributions by automating the dev setup
#11316 ConvertglobalScope
andisNodeJS
to proper modules
π #11318 [PDFHistory] Move the IE11pushState
/replaceState
work-around tosrc/shared/compatibility.js
(PR 10461 follow-up)
β‘οΈ #11317 Update npm packages
β #11334 UsegetBytes
, rather than looping overgetByte
, inFlateStream.prototype.readBlock
#11335 Subtractstream.start
when getting thestartXRef
property for documents with a Linearization dictionary (issue 11330)
π¨ #11346 Ensure that attempting to print withdisableAutoFetch
set will fail gracefully (issue 11339)
#11338 Reduce duplication when registering event listeners for theToolbar
buttons, and other small clean-up
#11350 Convert{BaseViewer, PDFThumbnailViewer}._pagesRequests
from an Array to a WeakMap
π¨ #11353 Removedocument.attachEvent
code fromweb/pdf_print_service.js
since it's only necessary for old IE versions
#11325 Added custom file transform function
π #11354 Enable thegetter-return
,no-dupe-else-if
, andno-setter-return
ESLint rules
π #11356 Remove outdated, and misleading, JSDoc comment from thePDFDocument
class
π #11363 Remove theNumber.isInteger
checks fromXRef.fetchUncompressed
(PR 8857 follow-up)
#11370 Stop caching Streams inXRef.fetchCompressed
#11373 Slightly simplify the XRef cache lookup inXRef.fetch
#11374 Set the firstpdfPage
immediately in{BaseViewer, PDFThumbnailViewer}.setDocument
#11382 Fix an incorrect condition inBaseViewer.isPageVisible
(PR 10217 follow-up)
π #11388 Remove theviewer
option from thePDFPresentationMode
constructor
#11390 Ensure thatPDFDocument.checkFirstPage
waits for cleanup to complete (PR 10392 follow-up)
#11391 [api-minor] ReplaceglobalScope
with the standardglobalThis
property instead
#11387 Handle corrupt ASCII85Decode inline images with truncated EOD markers (issue 11385)
#11398 Attempt to improve thePDFDocument
error message for empty files (issue 5887)
π #11404 [api-minor] Move theReadableStream
polyfill to the global scope
#11407 Bump npm from 6.13.0 to 6.13.4
#11406 Re-factor thefind
helper function, insrc/core/document.js
, to search through the raw bytes rather than a string
#11380 Add areset
method to thePDFHistory
implementation
β #11413 Re-factor thenpm test
command, used by Travis, to avoid running the 'default_preferences' tasks concurrently (issue 10732)
β‘οΈ #11415 Updatenpm
packages and l10n files
#11418 [api-minor] Simplify the fallback fake worker loader code insrc/display/api.js
#11422 Use thestrict
modeassert
in the pdf2png Node.js example (issue 10768)
#11425 Use const in viewer_compatibility.js
#11426 Use const in viewer.js
#11427 Use const in view_history.js
π» #11428 Use const in ui_utils.js
#11429 Use const in toolbar.js
β‘οΈ #11436 Update webpack-stream to fix vulnerabiliy reported by npm and dedupe Webpack
π #11440 Tweak the "gets page stats after rendering page, withpdfBug
set" unit-test to remove an intermittent failure on Travis
#11437 Extract & use createHeaders helper
#11431 Use const in secondary_toolbar.js
#11430 Use const in text_layer_builder.js
#11433 Use const in pdf_thumbnail_viewer.js
#11432 Use const in preferences.js
π #11423 Ignore Metadata entries with incorrectly encoded characters, when setting the viewer title (bug 1605526)
π¨ #11443 Support OpenAction dictionaries withoutType
entries when parsingPrint
actions (issue 11442)
#11446 Enable auto-formatting of the entire code-base using Prettier (issue 11444)
β #11445 Include a unit test for OpenAction dictionaries withoutType
entries (PR 11443 follow-up)
π #11449 Move the regular expression, used with auto printing in the viewer, toweb/ui_utils.js
and also use it in the API unit-tests
π #11450 Enable the ESLintprefer-const
rule in theweb/
directory
π #11454 Move the SegoeUISymbol font to thegetNonStdFontMap
(PR 8698 follow-up)
β‘οΈ #11455 Updatenpm
packages and l10n files
#11447 Convert all non-RGBA colors to RGBA colors
#11463 [Firefox] Ensure that telemetry will be correctly recorded even when the PDF header is missing (bug 1606566)
β‘οΈ #11472 Update the year in thelicense_header
files
#11466 [Firefox] Slightly simplify how the generator is determined, when sending telemetry data from the viewer
π #11474 [api-minor] Remove the Webpack-only npm dependencies frompdfjs-dist
(PR 11418 follow-up)
#11465 Ensure that allimport
andrequire
statements, in the entire code-base, have a.js
file extension
π #11488 Enable theno-nested-ternary
ESLint rule in theweb/
directory
π #11505 Enable the ESLintno-unneeded-ternary
rule
#11504 Adddirection: ltr;
to the canvases used inexamples/learning
, to ensure correct text rendering (issue 11457)
π #11503 Remove the unusedid
properties from page and thumbnail canvas/image DOM elements (issue 11499)
β‘οΈ #11520 Update theGlobalWorkerOptions.workerSrc
JSDoc comment
π #11521 Remove thesupportsDocumentColors
warning in MOZCENTRAL builds (bug 844349 follow-up)
π #11519 Enable import/extensions of ESlint plugin to enforce allimport
have a.js
file extension.
π #11522 Ensure that the viewer telemetry reporting, and fallback code, runs in development mode and GENERIC builds
β #11510 Skip failing FBF tests in Google Chrome when runningmakeref
on the bots
#11529 Display the CSS tab in the interactive examples (issue 11506 follow-up)
#11502 Fix a couple of cases where Prettier broke existing formatting (PR 11446 follow-up)
π #11511 Enable theno-nested-ternary
ESLint rule (PR 11488 follow-up)
π #11497 Add support forPromise.allSettled
π #11533 Remove the "useOnlyCssZoom" (debugging) hash parameter
π #11489 Remove theFIREFOX
build flag, since it's completely unused and simplify a couple ofPDFJSDev
checks
π #11534 Enable the ESLintprefer-const
rule globally (PR 11450 follow-up)
#11515 Cache the fallback font dictionary on thePartialEvaluator
(PR 11218 follow-up)
#11482 Convertsrc/core/jpg.js
to use thereadUint16
helper function insrc/core/core_utils.js
, rather than re-implementing it twice
#11535 Render Popup annotations last, once all other annotations have been rendered (issue 11362)
π #11508 Simplify the handling of unsupported/incorrect markers insrc/core/jpg.js
π· #11537 Send theverbosity
level when setting up fake workers (issue 11536)
#11544 Make thedecodeHuffman
function, insrc/core/jpg.js
, slightly more efficient
π #11545 Use the nativeURL.createObjectURL
method inweb/debugger.js
#11542 Add a README file to the/lib
folder inpdfjs-dist
(issue 11539)
#11546 Fix the indices of arguments for RadialAxial. It is related to #10646.
#11558 Remove theeslint-disable no-var
rule from theweb/grab_to_pan.js
file
β‘οΈ #11554 Updatenpm
packages
#11528 Hide .notdef glyphs in non-embedded Type1 fonts and don't ignore Widths
#11559 Fix how curveTo2 (v operator) is translated to SVG
π¦ #11567 Add support for CSS variables using thePostCSS CSS Variables
package (issue 11462)
π #11569 Replace most remainingElement.setAttribute("style", ...)
usage withElement.style = ...
instead
#11570 Re-factorToolbar._adjustScaleWidth
to improve/simplify how the zoom dropdown width is calculated
#11573 [api-minor] ChangePDFDocumentProxy.cleanup
/PDFPageProxy.cleanup
to return data
#11557 Avoid re-calculating thexScaleBlockOffset
when not necessary inJpegImage._getLinearizedBlockData
#11547 Use fewer multiplications inJpegImage._convertCmykToRgb
#11568 Ensure that the PDF header contains an actual number (PR 11463 follow-up)
#11551 Allow skipping of errors when reading broken/corrupt ToUnicode data (issue 11549)
#11579 Ignore spaces when normalizing the font name inFont.fallbackToSystemFont
(issue 11578)
#11582 [api-minor] Ensure that theArray.prototype
doesn't contain any enumerable properties
#11586 [TextLayer] Immediately set the padding, rather than checking if it's empty, inexpandTextDivs
π #11593 RemoveLoopbackPort.postMessage
special-case for polyfilledTypedArray
s
π #11596 Re-factor howMetadata
class instances store its data internally
π #11241 [api-minor] Produce non-translated/non-polyfilled builds by default
π #11598 Add polyfills to support iteration ofMap
andSet
π #11603 Enable theno-buffer-constructor
ESLint rule
π #11604 Enable theunicorn/prefer-starts-ends-with
ESLint plugin rule
π #11602 Move validation ofchromium/preferences_schema.json
to its own gulp task
β‘οΈ #11605 Updategulp lint
to support passing of the--fix
argument on the command line
β‘οΈ #11616 Update the PDF.js web page to link to both versions of the demo viewer (PR 11241 follow-up)
0οΈβ£ #11607 Add aPDFViewerApplication.initializedPromise
property to allow (easier) tracking of when the default viewer has been initialized
π #11620 Remove the unusedthisArg
fromRefSetCache.forEach
β‘οΈ #11621 Update packages and translations
π #11623 Use the ESLintno-restricted-syntax
rule to prevent direct usage ofnew Cmd()
/new Name()
/new Ref()
#11625 Use the same non-embedded Wingdings fallback for fonts named "Wingdings-Regular" too (PR 5463 follow-up, issue 11451)
#11630 Attempt to clarify, and improve the wording of, the Gitpod section of the README
#11540 Fix text spacing with vertical fonts. #7687 and #11526.
#11608 Add aignoreDestinationZoom
option/preference to allow users to preserve the current zoom level when navigating to internal destinations (issue 5064, 11606)
#11577 Prevent circular references in the /Pages tree
β‘οΈ #11590 Update links from IRC to Riot.
#11556 Fix the vertical writing mode with horizontal scaling. #11555.
π #11654 Simplify theBaseFontLoader.isFontLoadingAPISupported
getter
β‘οΈ #11631 [api-minor] DeprecategetGlobalEventBus
and update the "viewer components" examples accordingly
π #11660 Fix Type1 font parsing when .notdef is not at index zero
#11653 Ensure that there's always a setFont (Tf) operator before text rendering operators (issue 11651)
#11664 Prevent the zoom dropdown icon from being overridden when the element is:active
(bug 1619595)
β‘οΈ #11671 Update packages and translations
#11672 Slightly simplify the lookup of data inDict.{get, getAsync, has}
β‘οΈ #11673 Update theFontLoader.bind
method to avoid explicitly returningundefined
π #11667 Add a deprecation warning for theeventBusDispatchToDOM
option/preference (PR 11631 follow-up)
#11523 Add a heuristic, insrc/core/jpg.js
, to handle JPEG images with a wildly incorrect SOF (Start of Frame)scanLines
parameter (issue 10880)
#11675 Fix typo in comment
#11676 Slightly improve theBaseViewer.{firstPagePromise, onePageRendered, pagesPromise}
functionality
π #11680 Prevent lookup errors inPartialEvaluator.hasBlendModes
from breaking all parsing/rendering of a page (issue 11678)
π #11690 Remove transition effects from toolbar buttons/fields
β #11686 Magnifier positioning in reftest analyzer
π #11692 MoveIsLittleEndianCached
/IsEvalSupportedCached
tosrc/shared/util.js
, and rename theisSpace
helper function toisWhiteSpace
π #11695 Remove variable shadowing from the JavaScript files in theweb/
folder
#11699 Bump acorn from 6.4.0 to 6.4.1
π #11644 [api-minor] Add more general OpenAction support (PR 10334 follow-up, issue 11642)
#11553 Fix the horizontal scaling of texts with SVG backend. #10988
#11698 Don't accidentally accept invalid glyphNames which appear to follow the Cdd{d}/cdd{d} format inPartialEvaluator._buildSimpleFontToUnicode
(issue 11697)
β #11700 Ensure that the JavaScript-warning is always displayed, in the viewer, regardless of browser printing support
π #11706 Move thewebViewerOpenFile
function, and the "openfile" eventBus listener, since they only matter in GENERIC builds of the default viewer
π #11714 Enable theprefer-exponentiation-operator
ESLint rule
β‘οΈ #11711 Update packages and translations
#11716 [api-minor] Change the pageIndex, onPDFPageProxy
instances, to a private property -
v2.3.200 Changes
October 03, 2019π Changes since v2.2.228:
#10960 Bump versions in
pdfjs.config
#10963 Ensure thatPDFViewerApplication.{zoomIn, zoomOut}
won't run when PesentationMode is active (PR 10652 follow-up)
π #10959 Remove thedata-pdfjsprinting
attribute on the<body>
when destroyingFirefoxPrintService
/PDFPrintService
instances (issue 10948)
#10962 Prevent "Uncaught promise" messages in the console when cancellingTextLayer
tasks (PR 10601 follow-up)
#10964 Bump lodash from 4.17.10 to 4.17.14
π #10958 Remove theintentState.receivingOperatorList
boolean since it's redundant
#10850 Scale stroking line width when using a tiling pattern.
#10851 Apply bounding box before using shading patterns.
π #10950 Fixed testing webserver to handle paths correctly on Windows
#10966 Add timestamp to the page rendered event.
π #10968 Remove uselesswrapReason
calls in theMessageHandler
class
#10970 Simplify, and inline, thefinalize
function in theMessageHandler
class
β #10969 Add an API unit-test for thestopAtErrors
option (PRs 8240 and 8922 follow-up)
π¨ #10974 Simplify thePDFDocument.fingerprint
method slightly
π #10820 Annotations - Added parsing of IRT, RT, State and StateModel
#10987 Bump js-yaml from 3.12.0 to 3.13.1
π¨ #10990 Refactor theonBeforeDraw
/onAfterDraw
functionality used inBaseViewer
andPDFPageView
#10979 [Firefox] Re-factor the 'zoomreset' message handling in the viewer (PR 10652 follow-up)
#10986 Attempt to significantly reduce the number ofChunkedStream.{ensureByte, ensureRange}
calls by inlining thethis.progressiveDataLength
checks at the call-sites
#10993 Add thedocBaseUrl
API parameter toAppOptions
in the viewer
π #10995 Remove an unnecessaryPDFDocumentProperties.setFileSize
call, relevant for the Firefox built-in viewer, and use the "normal" code-path inPDFViewerApplication.open
instead
π #11001 Inline theisCmd
check in theParser.shift
method
#10996 Avoid creating aPDFFindBar
instance, in the Firefox built-in viewer, when not actually necessary
π #11003 Ensure that setting thezoomDisabledTimeout
isn't skipped, regardless of the supported zoom keys, when handling mouse wheel events (PR 7097 follow-up)
#11012 Reduce the number of function calls inEvaluatorPreprocessor.read
#11019 Decode URL encoded filenames from content disposition headers
#11020 Add a work-around, inglyphlist.js
, for bad PDF generators which use a non-standard/f_f
string in theEncoding
dictionary when referring to the ff ligature (issue 11016)
#11033 Ensure that the loading indicator, in the pageNumber input, is hidden when the viewer is closed
β‘οΈ #11029 [api-minor] Update telemetry to use 'categorical' histograms.
#11034 Ensure thatReadableStream
s are cancelled with actual Errors
#11038 [api-minor] Fix completely brokengetStats
method by returning stats in Objects, rather than in Arrays (PR 11029 follow-up)
#11013 [api-minor] Implement quadpoints for annotations in the core layer
#11048 Use more compact keys inPDFLinkService._pagesRefCache
#11049 Add page rendered timestamp to telemetry.
π #11047 Support corrupt PDF files with invalid/non-existent Group /CS entries (issue 11045)
#11051 Actually compare thecropBox
andmediaBox
correctly in thePage.view
getter
#11057 Handle some corrupt/truncated JPEG images that are missing the EOI (End of Image) marker (issue 11052)
#11059 Fallback gracefully when encountering corrupt PDF files with empty /MediaBox and /CropBox entries
π #11062 Miscellaneous small clean-up of code in theweb/
folder
#11064 Convert thesrc/shared/util.js
file to ES6 syntax
π #11070 Inline theisString
check in theParser.getObj
method
π #11073 Move polyfill for codePointAt to String prototype.
#11076 Replace theXRef.cache
Array with a Map instead
#11081 added in information about pdfjs/webpack
π #11079 [TextLayer] Only cache the currenttextDiv
style whenenhanceTextSelection
is enabled and use template strings inexpandTextDivs
#11087 Add a way to disable external links.
#11086 [TextLayer] Only cache theoriginalTransform
whenenhanceTextSelection
is enabled
#11091 [TextLayer] Only handle positive padding values inexpandTextDivs
π #11090 [TextLayer] Use an Array to build the totaltransform
, rather than concatenating Strings, inexpandTextDivs
π¨ #11093 Shorthand afterPrint signature in app.js
π #11092 [TextLayer] Use an Array to build the totalpadding
, rather than concatenating Strings, inexpandTextDivs
#11069 Use streams for OperatorList chunking (issue 10023)
β‘οΈ #11096 Update translations/packages and upgrade toeslint
version 6
β #11095 Include a reduced, non-linked PDF file for the attachments API unit test
#11097 [TextLayer] Only measure the width of the text, in_layoutText
, for multi-char text divs
#11102 Bump mixin-deep from 1.3.1 to 1.3.2
β‘οΈ #11104 [TextLayer] Avoid unnecessary font updates in_layoutText
and removesetAttribute
usage inappendText
#11107 VariousMessageHandler
improvements when using Streams
π #11110 Remove support for thescope
parameter in theMessageHandler.on
method
#11111 Inline theresolveCall
helper function at its call-sites inMessageHandler
π #11112 Remove the API/Worker version warning message inTESTING
mode
#11108 Use more ES6 syntax in the annotation code
#11115 Ensure thatError
s are handled correctly when usingpostMessage
with Streams inMessageHandler
π #11123 [api-minor] Remove thepostMessageTransfers
parameter, and thus the ability to manually disable transferring of data, from the API
π· #11118 Transfer, rather than copy, CMap data to the worker-thread
β‘οΈ #11127 Update theeslint-plugin-mozilla
to the latest version (PR 10905 follow-up)
#11129 Prevent "offsetParent is not set -- cannot scroll" errors when the viewer loads in e.g. a hidden <iframe>
π #11133 Enable theno-async-promise-executor
ESLint rule
π· #11130 Don'tenqueue
unused properties when sending 'GetOperatorList' data from the worker-thread (PR 11069 follow-up)
#11138 [CRX] Ignore auto-generated from Chrome
#11134 Ensure thataddLinkAttributes
is always called with a validurl
parameter
0οΈβ£ #11142 Stop dispatching a "localized" event from the webL10n library, since it's unused and may clash with the default viewer
π· #11106 Abort, with a small delay,getOperatorList
on the worker-thread when rendering is cancelled (PR 11069 follow-up)
β‘οΈ #11145 Update translations and packages
#11155 Miscellaneous (small) clean-up of theMessageHandler
code
#11159 For Type1 fonts, replace missing font dictionary /Widths entries with ones from the font data (issue 11150)
#11158 Avoid floating point inaccuracy in gradient color stops
#11163 Fix the link in the doc website
#11146 Replace ourURL
polyfill with the one fromcore-js
π #11165 Enable a couple ofreturn
related ESLint rules
β‘οΈ #11168 Remove unmaintained localizations and update translations and packages
#11171 Fix the inconsistent return types forDict.{get, getAsync}
π¦ #11173 Replace the bundledReadableStream
polyfill with theweb-streams-polyfill
npm package (issue 11157)
#11169 Reduce the number of function calls in theDict
class
π» #11185 Convert the various...Exception
s to proper classes, to reduce code duplication
π· #11182 Forbid sending ofDict
s andStream
s, withpostMessage
, when workers are disabled
π #11187 Convert the various image decoder...Error
s to classes extendingBaseException
(PR 11185 follow-up) -
v2.2.228 Changes
July 10, 2019#10557 Bump versions in
pdfjs.config
π #10556 [api-minor] Expose the existence of aCollection
dictionary via thegetMetadata
API method (issue 10555)
β‘οΈ #10554 Simplify theupdatetextlayermatches
event handling inTextLayerBuilder
0οΈβ£ #10548 Generate thedefault_preferences.json
file fromAppOptions
β #10558 Re-factor thePDFDataRangeTransport
unit-tests and enable them in Node.js/Travis
β‘οΈ #10560 Update translations and packages
#10579 Re-factor thePDFSidebar
constructor to simplify its call-site (PR 10123 follow-up)
#10578 Try to temporarily hack around the__non_webpack_require__
bug, and update Webpack to the latest stable version (issue 10177)
π #10577 Move worker-thread only functions fromsrc/shared/util.js
and into a newsrc/core/core_utils.js
file
#10582 UsePromise.prototype.finally
in thePDFRenderingQueue.renderView
method
β #10589 Run thecustom_spec
unit-tests in Node.js/Travis (PR 10537 follow-up)
#10585 Load built-in CMap files using the Fetch API when possible
#10573 Avoid truncating/breaking some Type3 glyphs incompileType3Glyph
(bug 1245391, issue 10568)
β‘οΈ #10599 Update Webpack to the latest stable version (4.29.6)
#10597 Ensure that the temporary canvas created inCanvasGraphics.isFontSubpixelAAEnabled
will be cleared
#10595 Zero the width/height of the temporary canvas used duringJpegDecode
(issue 10594)
#10591 Add unique glyph names for CFF fonts.
#10601 Zero the width/height of the temporary canvas used duringTextLayer
rendering
#10604 Put the string name of the glyph in the charset array.
β‘οΈ #10606 Update translations and packages
π #10590 Fix missing moveTos in SVG paths
π· #10608 Reduce usage ofDate.now()
insrc/core/worker.js
0οΈβ£ #10610 Add type validation to thedefault_preferences
generation (PR 10548 follow-up)
β #10605 Convertlet
toconst
if possible in, and improve unit test coverage for,src/display/display_utils.js
#10615 Handle corrupt ASCII85Decode inline images with whitespace "inside" of the EOD marker (issue 10614)
#10621 Don't scale SVG stroke width by text matrix
π #10634 MoveNativeImageDecoder
into a separate file, and convert it to aclass
#10633 ConvertMurmurHash3_64
to an ES6 class
0οΈβ£ #10628 Try to improve text-selection for Type3 fonts that utilize a non-default /FontMatrix (bug 1513120)
#10636 Small clean-up of thePDFDocumentProxy.destroy
method and related code
#10647 Actually transfer eligible ImageMask data, rather than always copying it
#10644 Ensure thatblob:
URLs will be revoked when pages are cleaned-up/destroyed (JPEG memory usage)
#10646 Implement linear-gradient, radial-gradient and dummy-pattern in SVGGraphics.
β #10635 Convertsrc/core/parser.js
to ES6 syntax and write more unit tests for the lexer and the parser
β‘οΈ #10657 Update test case description
π» #10652 Prepare theMOZCENTRAL
viewer for receiving zoom events from the browser UI (bug 786674, bug 1177385)
π #10668 Remove the Firefox-specific 'read with streaming' unit-test
#10681 fix: electron enviroment detection
#10685 Take theFirstChar
/LastChar
properties into account when computing the hash inPartialEvaluator.preEvaluateFont
(issue 10665)
#10683 Use CMap in Type0 fonts when CFF is not a CID font
#10692 Add Mozilla Code of Conduct
β‘οΈ #10698 Update translations/packages and include the code of conduct forpdfjs-dist
too
#10706 Add missinghasChildNodes
polyfill todomstubs.js
(PR 10022 follow-up)
#10675 [Firefox regression] FixdisableRange=true
bug inPDFDataTransportStream
π #10713 Removesrc/core/annotation.js
from thegulp jsdoc
build target
π #10678 Removemoz-chunked-arraybuffer
support, and related code, fromsrc/display/network.js
π #10709 [api-minor] Add basic support for PageLayout in the API and the viewer
β‘οΈ #10714 [Firefox] Ensure that loading progress is reported, and the loadingBar updated, whendisableRange=true
is set
#10674 Convertsrc/display/svg.js
to ES6 syntax and implementsetRenderingIntent
andsetFlatness
for the SVG backend
β #10715 Add test for fetch_stream
#10725 Attempt to clarify thel10n
section ofCONTRIBUTING.md
#10723 [api-minor] Implement caret annotations
#10728 Annotations - _preparePopup method replaced with MarkupAnnotation
β‘οΈ #10696 UpdateChunkedStream.makeSubStream
to actually check if (some) data exists when thelength
parameter is undefined
#10694 Avoid dispatching range requests to fetch PDF data that's already loaded with streaming (PR 10675 follow-up)
β‘οΈ #10733 Update translations and packages
π #10735 [api-minor] Implement free text annotations
#10742 [Firefox] Avoid displaying the indeterminate loadingBar whendisableStream=true
is set (PR 10714 follow-up)
#10746 Add links to PDF.js homepage and API reference in README.md
π #10727 Support (rare) Type3 fonts which contains image resources (issue 10717)
#10754 Add agetDocId
method to theidFactory
, inPage
instances, to avoid passing aroundPDFManager
instances unnecessarily (PR 7941 follow-up)
π #10738 [api-minor] Add support for ViewerPreferences in the API (issue 10736)
0οΈβ£ #10765 Addpassive: false
to thewheel
event listener, to work-around broken default behaviour in Chrome 73 and above (issue 10761)
β‘οΈ #10784 Ensure that theOperatorList
constructor actually initializes aNullOptimizer
when intended (PR 9089 follow-up)
#10756 Attempt to handle corrupt PDF documents that contains path operators inside of text object (issue 10542)
#10789 ChangePartialEvaluator.handleColorN
to throw when no valid pattern is found
#10771 [api-minor] Implement creation/modification date for annotations
β‘οΈ #10795 Update thecanvas
npm package to fix Travis CI builds (issue 10790)
π #10805 Enable theconsistent-return
ESLint rule
#10794 Fix glyph at index zero in CIDFontType2 that has a CIDToGIDMap stream
π #10826 Remove unusedref
property from theparameters
object used when creating annotations inAnnotationFactory._create
#10827 Convert the (remaining) network streams to ES6 classes
π§ #10854 make print resolution configurable via AppOptions
#10833 [api-minor] Implement contents and creation date for the correct annotation types
β‘οΈ #10859 Update translations and packages
#10862 Add caching to reduce the number ofRef
objects
#10863 Ensure that theCmd
/Name
/Ref
caches are cleared when running othercleanup
code
βͺ #10869 Restore referrer preserving functionality in Chrome 72+
#10867 Don't clip if path is undefined in SVG back-end
#10872 Re-use, rather than re-creating, someArray
s when resetting them insrc/display/api.js
π· #10873 Ensure that theCmd
/Name
/Ref
caches are cleared when terminating the worker (PR 10863 follow-up)
#10877 Ignore Annotations with too large borderwidth
s, to prevent theannotationLayer
from rendering it over the surrounding document (bug 1552113)
π¨ #10879 [api-minor] Attempt to reduce memory usage during printing, by always runningcleanup
once rendering has finished
0οΈβ£ #10890 Add support for outline items, in the default viewer, which default to collapsed when the outline is built
π #10897 Remove a superfluouslinkService.isPageVisible
check fromPDFFindController
(PR 10217 follow-up)
π¨ #10898 Allow experimenting with theprintResolution
AppOption when printing with the built-in Firefox version
π #10905 Pin the version ofeslint-plugin-mozilla
to prevent failures on Travis (issue 10901)
π #10903 MovePDFWorkerStream
and related code to its own file
π #10926 Change the signature of theParser
constructor to take a parameter object
π #10925 Enable theeslint-plugin-no-unsanitized
ESLint plugin to disallow unsafe usage of e.g.innerHTML
#10902 Implement tiling patterns for the SVG back-end
β‘οΈ #10936 Update translations and packages
#10938 Reduce the number ofisCmd
calls slightly in theXRef
class
βͺ #10937 Restore the header size limit of 80 KB
#10947 Make thefind
helper function, insrc/core/document.js
, more efficient by usingpeekBytes
rather reading the stream one byte at a time
#10949 Delay initialization of searching, in the viewer, until the first page has rendered -
v2.1.266 Changes
February 16, 2019π Changes since v2.0.943:
#10187 Bump versions in
pdfjs.config
#10188 Hide the beta version button on the website if there is only a stable version
#10162 Normalize BBox of form XObjects in SVG back-end
#10185 Reduce the number of redundant text normalization operations inPDFFindController
#10182 Small clean-up of the search related methods inTextLayerBuilder
#10184 Ensure that matches are not scrolled into after the findbar has been closed (PR 10100 follow-up)
#10196 [Regression] Ensure that "Highlight All" is propagated to all pages for 'findagain' events where the findbar was previously closed (PR 10100 follow-up)
#10190 Add a helper method for_getVisiblePages
, inBaseViewer
, for the case where only a single page is displayed in the viewer
β‘οΈ #10201 Reduce the number of redundantupdatetextlayermatches
events dispatched when calculating matches inPDFFindController
#10203 ChangecanvasInRendering
to aWeakSet
instead of aWeakMap
π #10096 Remove theattachDOMEventsToEventBus
functionality, sinceEventBus
instances are able to re-dispatch events to the DOM (PR 10019, bug 1492849 follow-up)
βͺ #10202 Attempt to clean-up/restore pending rendering operations onRenderTask.cancel
(issue 10200)
#10217 For repeated 'findagain' operations, attempt to reset the search position if the user has e.g. scrolled in the document (issue 4141)
π #10219 Convertsrc/core/ps_parser.js
to use ES6 classes
#10228 Don't detect nw.js as node.js
#10233 [api-minor] ConvertPDFObjects
, insrc/display/api.js
, to an ES6 class
π #10238 Move theinterface
definitions out ofsrc/core/worker.js
and into their own file
β‘οΈ #10245 UpdateBaseViewer.scrollPageIntoView
to always validate thepageNumber
parameter
#10223 When the search query changes, regardless of the search command, always re-calculate matches (bug 1030622)
#10220 Only scroll search results into view as a result of an actual find operation, and not when the user scrolls/zooms/rotates the document (bug 1237076, issue 6746)
#10231 Stop scrolling the document when "Highlight All" is toggled in the findbar (issue 5561)
#10244 Fix webpack example
#10255 Avoid unnecessaryPDFFindController.scrollMatchIntoView
calls inTextLayerBuilder._renderMatches
whenhighlightAll
is set (PR 10201 follow-up)
#10256 Attempt to tweak the error messages, inBaseViewer
, for invalid pageNumbers/pageLabels (bug 1505824)
β‘οΈ #10264 Update translations and packages
#10197 Usespan
instead ofdiv
in the text layer
#10246 Convert the remaining code insrc/display/api.js
to use ES6 classes
#10274 Fallback to an exhaustive search, in corrupt PDF files, for NameTrees/NumberTrees that are not correctly ordered (issue 10272)
π #10294 Add ESLint plugin import to be warned against invalid paths
#10292 Replace uglify-es with Terser
β¬οΈ #10293 Upgrade to Babel 7
#10275 FixNameOrNumberTree.get
to actually perform a binary search to find the requested key
β‘οΈ #10299 Update packages and translations
β‘οΈ #10300 Include forgotten changes after Wintersmith update
π #10318 InGENERIC
builds, dispatch a "webviewerloaded" event (from thewebViewerLoad
function) before initializing the viewer
π #10322 Remove unuseful variable
β #10323 Test the code as-is, in Node.js/Travis, rather than its Babel translated version
π #10340 Tweak thePDFHistory._tryPushCurrentPosition
method to work better with the different Scroll/Spread viewer modes
#10330 Handle line width of zero in SVG
#10304 Add protection against directory traversal attacks
β‘οΈ #10295 Update eslint-plugin-mozilla to 1.0.1
π #10337 Turn on ESLint in examples
#10351 Attempt to ignore mouse wheel zooming during tab switches (bug 1503412)
π #10350 Ignore thefieldValue
for Signature annotations, since they're currently unsupported (issue 10374)
β #10354 Disable source-map generation when running tests
#10356 Use high DPI icons on semi-high DPI screens.
#10358 Add keyboard shortcut to toggle sidebar (F4, same as Adobe Reader).
β¬οΈ #10266 Upgrade to Gulp 4
#10363 Fix small visual quirk in thumbnail viewer
π #10346 [api-minor] Add support, ingetMetadata
, for custom information dictionary entries (issue 5970, issue 10344)
#10369 [api-minor] Change thegetViewport
method, onPDFPageProxy
, to take a parameter object rather than a bunch of (randomly) ordered parameters
β‘οΈ #10375 Update translations and packages
π #10334 [api-minor] Add support for OpenAction destinations (issue 10332)
β‘οΈ #10378 Update remaining examples, and docs, to utilize current API functionality (issue 10377)
#10376 Convertsrc/core/chunked_stream.js
to ES6 syntax
#10392 Check that the first page can be successfully loaded, to try and ascertain the validity of the XRef table (issue 7496, issue 10326)
β‘οΈ #10394 Optimize theRef
class insrc/core/primitives.js
#10393 Convertsrc/core/document.js
to ES6 syntax
#10396 Optimizations to avoid intermediate string creation
π #10397 Ensure thatAnnotationBorderStyle.setWidth
is able to handle the input being aName
, to correctly deal with corrupt PDF documents (issue 10385)
#10398 Prevent errors in various methods inSimpleDOMNode
when thechildNodes
property is not defined (issue 10395)
#10277 Repair CFF fonts if stem hints are in wrong order
π #10404 Remove thefor ... of
loop from thePDFDocument.fingerprint
getter (issue 10401)
#10399 migrate to canvas 2.x api
π #10411 Adjust howAnnotationBorderStyle.setWidth
handles the input being aName
(issue 10385)
π #10408 Prevent errors, because of incorrect scope, in theXMLParserBase._resolveEntities
method (issue 10407)
π #10412 Prevent errors, inSimpleXMLParser.onEndElement
, when the stack has already been completely parsed (issue 10410)
#10417 Fix reading number of HTMX metrics.
π #10420 Update translations/packages and improve documentation
#10421 Switch to HTTPS for the license link on the website
#10422 Convert more files insrc/core
to ES6 syntax
π¨ #10424 Accept non-matching document fingerprints, inPDFHistory
, when the viewer is reloaded (issue 6847)
β‘οΈ #10423 Add support for updating the document hash, off by default, when the browser history is updated (issue 5753)
#10441 Handle more cases of corrupt PDF files with missing 'endobj' operators, where the "obj" string is immediately followed by the dictionary (PR 9288 follow-up)
#10436 Avoid truncating inline images, where the data and the "EI" marker is glued together (issue 10388)
β #10425 Write more unit tests for the find controller
π #10444 Remove left-over console log from the find controller unit tests
#10447 Handle malformed URIs as bad requests in the development webserver
#10443 PreventTypeError: views[index] is undefined
being throw ingetVisibleElements
when the viewer, or all pages, are hidden
#10462 Tweak theDOMTokenList.toggle
polyfill (issue 10460)
β‘οΈ #10461 Avoid setting incorrect document URLs, in IE 11, when the browser history is updated (PR 10423 follow-up)
π #10457 When parsing Metadata, attempt to remove "junk" before the first tag (PR 10398 follow-up)
π¨ #10466 Move/refactor the code in theBaseViewer.update
method to reduce duplication in the extending classes
#10467 Convert some usage ofindexOf
tostartsWith
/includes
where applicable
π #10471 Implement a unit test for metadata parsing to ensure that it's not vulnerable to the billion laughs attack
π #10470 Try to, completely, avoid loading theReadableStream
polyfill in MOZCENTRAL builds
π #10473 Add anArray.from
polyfill, using core-js, and remove some compatibility hacks from thesrc/display/content_disposition.js
file
β‘οΈ #10474 Update translations and packages
#10480 [Regression] Fix theFontInspector
in the PDFBug debugging tools
β‘οΈ #10483 Update themobile-viewer
example to use the newPDFHistory.initialize
format (PR 10423 follow-up)
π #10484 Stop bundling theReadableStream
polyfill in MOZCENTRAL builds (PR 10470 follow-up)
#10492 Ensure thatXRef.indexObjects
can handle object numbers with zero-padding (issue 10491)
#10482 Implement Decode entry in Indexed images
0οΈβ£ #10494 Reduce unnecessary duplication of theisDefaultDecode
methods onColorSpace
instances
π #10489 Move more code/methods intoBaseViewer
, and simplify thePDFSinglePageViewer._scrollIntoView
method slightly
#10501 IngetVisibleElements
, checkfirstVisibleElementInd
rather thannumViews
before backtracking (PR 10443 follow-up)
βͺ #10499 Attempt to clean-up/restore pending rendering operations when errors occurs while aRenderTask
runs (PR 10202 follow-up)
π #10504 Enable theno-useless-catch
ESLint rule
#10508 Do the final text scaling correctly influshTextContentItem
(issue 8276)
#10515 Add asettled
property, tracking the fulfilled/rejected stated of the Promise, tocreatePromiseCapability
π #10517 [api-minor] Remove thedocument.currentScript
polyfill
0οΈβ£ #10502 Modify a number of the viewer preferences, whose current default value is0
, such that they behave as expected with the view history
#10525 Convert more code to useclassList.toggle
with theforce
parameter
π #10527 Add a polyfill forclassList.{add, remove}
with more than one parameter
#10532 Bump base version and version prefix inpdfjs.config
#10533 Bump the version number inpdfjs.config
π #10534 Try to hack-around the brokenpdfjs-dist
links, such that they will point to the main library releases (issue 10391)
#10530 Fix copying on supplementary plane characters
#10545 Undo thepdfjs.config
version bumps
β #10537 Improve unit test coverage
#10540 [Chrome extension] Add missing "type" entry for theviewOnLoad
preference in thepreferences_schema.json
file (PR 10502 follow-up)
#10539 [api-minor] Fallback to the built-in font renderer when font loading fails -
v2.0.943 Changes
October 27, 2018π Changes since v1.10.100:
π #9730 Ignore the rest of the image when encountering an EOI (End of Image) marker while parsing Scan data (issue 9679)
#9740 Use Dict.getArray, instead of Dict.get, when getting the 'Size' in constructSampled in src/core/function.js
π #9771 Remove thegulp extension
build target
#9773 Fix multibyte decoding in content_disposition.js
β #9769 Reduce the amount of errors logged, primarily in Node.js/Travis, when running the unit-tests
π₯οΈ #9774 Usefs.unlinkSync
instead offs.unlink
when removing files in the font tests
π #9741 Build improvements
π #9779 Remove dead code in thegh-pages-prepare
task in the Gulpfile
#9777 VariousPageViewport
andMessageHandler
cleanup
#9781 Miscellaneous API clean-up
π #9792 Import translations
β #9660 Support running the tests headlessly.
π #9794 Implement drag-and-drop support in the viewer for local files
π #9793 RemoveUtil.appendToArray
andUtil.prependToArray
π #9689 Fixed critical unhandled promise that prevented error catching using API
#9796 Disable (drag-and-drop) file opening if Presentation Mode is active (PR 9794 follow-up)
π #9801 Replace deprecatednew Buffer(string, 'base64')
constructor withBuffer.from(string, 'base64')
π #9815 Remove thedisableFullscreen
hack for embedded IE 11 (issue 9585)
#9816 Fix regression causing the pages to be offset horizontally in Presentation Mode (PR 8993 follow-up)
π #9595 Disable ftp support in Chrome 59+, add file chooser at file
#9819 Fix regression affecting the horizontalviewerContainer
offset for small window widths (PR 9816 follow-up)
#9809 AllowFontFaceObject.getPathGenerator
to ignore non-embedded fonts during rendering
β‘οΈ #9802 UpdateColorSpace
andPDFImage
to useUint8ClampedArray
s and remove manual clamping/rounding
0οΈβ£ #9821 Set the correct document title when opening a new file in theGENERIC
default viewer
#9795 ReplaceUtil.extendObj
byObject.assign
#9827 Fix various corrupt PDF files (issue 9252, issue 9418)
π #9830 Removed safari compatibility check (issue #9824)
#9835 Clean-up thePDFDocumentProxy.loadingParams
method in the API, and thelocale
viewer option
#9832 Fix a number of regressions/inefficiencies introduced by adding Scroll/Spread modes to the viewer (PR 9208 follow-up)
β #9839 Add unit-tests forPDFPageProxy.stats
(PR 9245 follow-up)
π¦ #9729 Add agulp image_decoders
command to package the image decoders (i.e. jpg.js, jpx.js, jbig2.js) separately, and publish them in pdfjs-dist
#9841 Various (small) cleanup related to setting the initial document position on load
π― #9849 Replace thecloneObj
helper function, in the viewer, with nativeObject.assign
(PR 9795 follow-up)
#9838 Error, rather than warn, once a number of invalid path operators are encountered inEvaluatorPreprocessor.read
(bug 1443140)
π #9852 Proper Error Handling for Build Numbers of Downloaded Sources (Non-Git repositories).
#9853 Fix re-rendering, using the same canvas, when rendering was previously cancelled (PR 8519 follow-up)
β‘οΈ #9859 Update translations and packages
β‘οΈ #9860 Update the localization README to indicate that the translations are imported from the Nightly channel
#9858 Additional Scroll/Spread mode clean-up (PR 9832 follow-up)
π¨ #9861 RefactorPDFFindController
to use the 'pagesinit' event, dispatched on theeventBus
, to resolve the_firstPagePromise
#9866 Prevent the development viewer, started withgulp server
, from breaking completely in Private Browsing mode
#9879 Correct the instructions in the README file forexamples/mobile-viewer
π #9880 Remove thejp-JP-mac
locale
#9877 Hide the Scroll/Spread mode buttons if the viewer is aPDFSinglePageViewer
instance (PR 9858 follow-up)
#9868 Stop exposing theURL
polyfill in the global scope
#9837 ReplaceNotImplementedException
withunreachable
#9881 Replace the remaining occurences ofinstanceof Array
withArray.isArray()
π #9887 Convert more code in the/src
folder to use ES6 classes, such thatUtil.inherit
can be removed
π #9886 Prevent errors insanitizeTTProgram
, during parsing of CALL functions, when encountering invalid functions stack deltas (bug 1473809)
π #9898 ChangewaitOnEventOrTimeout
, in web/ui_utils.js, to return a regularPromise
and remove thecreatePromiseCapability
import
π #9900 Prevent Metadata/XML parsing from breakingPDFDocumentProxy.getMetadata
when no XML root document is found (issue 8884)
#9904 Modified Examples to work without systemjs
π¨ #9913 Provide custom messages for theno-restricted-globals
ESLint rule, and refactor the.eslintrc
files (PR 9868 follow-up)
#9917 Add aBasePreferences.getAll
method and use it to fetch all Preferences at once inPDFViewerApplication._readPreferences
; ensure that theexternalLinkTarget
option is correctly set when the viewer is embedded
π» #9924 fix(browser): zlib is not available in browser
#9933 README.md: suggest usage of https instead of git protocol
#9935 [Regression] ConvertCatalog.builtInCMapCache
into aMap
, instead of an Object, to ensure that it's correctly reset (PR 8064 follow-up)
#9936 Validate the Preferences when fetching them from storage
#9925 Attempt to estimate the minimum requiredbuffer
length when initializingStreamsSequenceStream
instances
π¨ #9931 RefactorgetPage
(in the worker), and attempt to use theLinearization
dictionary to lookup the first Page
π #9920 [api-minor] Add anIsLinearized
property to thePDFDocument.documentInfo
getter, to allow accessing the linearization status through the API (viaPDFDocumentProxy.getMetadata
)
#9897 Prefer the Width/Height of the image data, rather than the image dictionary, for JPEG 2000 images (issue 9650)
#9938 Ensure that Type0, i.e. composite, OpenType fonts withCFF
tables are not treated as CFF fonts if their glyph mapping is non-default (issue 9915)
π #9946 Removed Extraneous Matrix Check in CalRGB Conversion
β #9948 Add (basic) unit-tests for the non-globalURL
constructor (PR 9868 follow-up)
β #9954 Stop warning for non-Name /Filter entries in thePDFImage
constructor (PR 9897 follow-up)
#9874 [api-minor] Include export value for checkboxes
β #9956 Allow loaded progress of 0 in unit tests.
β #9960 Fail when MD5 of test files fails on bots.
β #9959 Utility script to add a reference test.
π #9961 Parse the font file to determine the correct type/subtype, rather than relying on the (often incorrect) data in the font dictionary
#9958 Always fallback to system font on font failure.
β‘οΈ #9965 Update translations and packages
#9964 Attempt to throwMissingPDFException
when applicable innode_stream.js
(issue 9791)
#9968 Tweak the MMType1 font detection ingetFontFileType
to improve font telemetry (PR 9961 follow-up)
π¨ #9822 [api-minor] Refactor the annotation code to be asynchronous
#9975 Re-factordestinations
/getDestination
to reduce unnecessary duplication, and reject non-string inputs
#9980 Ensure thatUint8ClampedArray
is used for image data transfered bygetTransfers
(PR 9802 follow-up)
π #9988 Remove the unusedPDFDocument.mainXRefEntriesOffset
method
β‘οΈ #9989 Update translations and packages
π #9987 [api-minor] Remove the obsoletecreateBlob
helper function
π #9991 Remove the deprecated ways, inBaseViewer
, of setting the Scroll/Spread modes (PR 9858 follow-up)
π #9977 Add support forasync
/await
using Babel
π #10000 Remove the unuseddefaultColor
property onColorSpace
instances
β‘οΈ #10008 Update translations/packages and fix duplicated function name in the Esprima fixtures
#9990 Convert theCatalog
class, insrc/core/obj.js
, to ES6 syntax
#10007 Convert the code insrc/core/colorspace.js
to use ES6 classes
#10015 Adding chunkname to async loaded code
π #10020 Ensure that the builtPdfJsDefaultPreferences.jsm
file won't be affected/touched during tree-wide ESLint rule changes inmozilla-central
(PR 9571 follow-up)
#10022 Implement text rendering modes in SVG backend
π #10010 Attempt to find truncated endstream commands, in the fallback code-path, inParser.makeStream
(issue 10004)
π #10019 Add general support for re-dispatching events, onEventBus
instances, to the DOM
#9986 Attempt to combine separate beginText/endText sequences ingetTextContent
(issue 9984)
#10032 Replace broken link forpr8808.pdf.link
#10031 Add a new parameter toJpegImage.getData
to indicate the source of the image data (issue 9513)
#10033 [api-minor] Implement a permissions API
βͺ #10041 Revert "Attempt to combine separate beginText/endText sequences ingetTextContent
(issue 9984)"
#10049 Fix font-string variable name typo
#9340 Map all glyphs to the private use area and duplicate the first glyph.
π¨ #9995 Refactor code in theweb/
folder to useasync
/await
π #10053 Simplify the "spaced-comment" ESLint rule
π #10034 RemovegetSinglePixelWidth
workaround
β‘οΈ #10054 Update translations/packages and use HTTPS for links inREADME.md
#10052 Display the index of the currently active search result in the matches counter of the findbar (issue 6993, bug 1062025)
#10055 Translate the new find match count strings to Dutch
π #10028 Add initial support for "Whole words" searching in the viewer
β‘οΈ #10056 [Regression] Ensure thatPDFFindBar.updateResultsCount
doesn't throw when the viewer is closed, by providing proper default values
#10060 Ensure thatPDFFindController._requestMatchesCount
won't return broken data when searching starts (PR 10052 follow-up)
β #10061 Implement unit tests for theisSameOrigin
andcreateValidAbsoluteUrl
utility functions and use theconst
keyword for constants insrc/shared/util.js
#10063 Slightly improve theisSourcePDF
parameter handling inJpegImage
(PR 10031 follow-up)
π #10070 Attempt to support plural forms in the matches counter of the findbar (issue 10067)
π¨ #10066 Refactor the find controller
π» #10071 Enable forwarding, inFirefoxCom
, of the matchesCount to the browser findbar (bug 1062025)
π #10078 Improve plural support for the matches counter
#10090 Ensure that all event properties are included, even if no (internal) listeners are registered, when re-dispatching events to the DOM (PR 10019 follow-up)
β‘οΈ #10095 Update packages and translations
#10111 ReplaceString.prototype.substr()
occurrences withString.prototype.substring()
β‘οΈ #10114 Update{PDFLinkService, PDFDocumentProperties}.setDocument
to make the "url" parameter optional
#10100 Clear all find highlights when the findbar is closed (issue 7468)
β‘οΈ #10116 Update packages and translations
β #10099 [api-major] Rework the find controller for unit testing
π #9982 Use the Font Loading API inMOZCENTRAL
builds, andGENERIC
builds for Firefox version 63 and above (issue 9945, bug 1088663)
#10119 Attempt to simplify thefileattachmentannotation
event dispatching
#10123 Attempt to simplify thePDFFindBar
andPDFSidebar
constructors
βͺ #10126 [Regression] Restore the ability to start searching before a document has loaded, and ignore searches for previously opened documents (PR 10099 follow-up)
#10128 MakePDFFindController
less confusing to use, by allowing searching to start whensetDocument
is called
π #10117 Add support of Ink annotation
π #10136 Remove the unusedmainContainer
parameter from theToolbar
constructor
#10138 Ensure thatToolbar.setPageScale
always sets thepageScaleValue
property to a valid value
π· #10139 Ensure that thePDFDocumentLoadingTask
is rejected when "setting up fake worker" failed (issue 10135)
#10133 Set returnValues.suggestedLength to Content-Length if integer
π· #10140 Combine thepdfjsFilePath
and fallbackworkerSrc
handling insrc/display/api.js
π· #10143 Ensure thatgetMainThreadWorkerMessageHandler
won't accidentally breakgetDocument
(PR 10139 follow-up)
#10150 Add missingpagesCount
getter toIPDFLinkService
andSimpleLinkService
π #10152 Add support forclassList.toggle
with the, optional, "force" parameter
π #10155 Add Build Status Button
π #10166 Bump version numbers for stable and beta releases
#10167 ExportCMapCompressionType
andPermissionFlag
on thepdfjsLib
object (issue 10148, PR 10033 follow-up)
#10161 Ensure thatonProgress
is always called when the entire PDF file has been loaded, regardless of how it was fetched (issue 10160)
#10168 ConvertPDFDataRangeTransport
to an ES6 class
β‘οΈ #10176 Update translations and packages
β #10179 Change splice to pop in annotation tests -
v1.10.100 Changes
June 06, 2018 -
v1.10.88 Changes
October 27, 2017π Changes:
π #8778 Use
Uint8ClampedArray
, when returning data, and remove manual clamping insrc/core/jpg.js
(issue 4901)
#8780 Version 1.9.426
#8783 UseUint8ClampedArray
when returning image data insrc/core/jbig2.js
andsrc/core/jpg.js
#8785 SVG: Don't render missing glyphs
π #8788 Attempt to delay disabling of the attachment view until FileAttachment annotations of the initial page has been parsed
π #8792 Fix caching of small inline images inParser.makeInlineImage
(issue 8790)
π #8794 Remove the migration code for old localStorage data inViewHistory
#8557 pdf2svg.js: provides ReadableSVGStream class to serialize a SVG as a stream
#8781__non_webpack_require__
-> require in SystemJS
#8491 JBIG2 halftone regions and pattern dictionaries
π #8807 Remove handling of fallback arguments fromPDFViewer.scrollPageIntoView
π #8812 Moves global scope out of shared/util.
#8813 Use Array.isArray in the LoopbackPort.
#8810 Cache PdfJs's enabled setting for delayed init
#8800 Try to recover if we reach the end of the stream when searching for theEI
marker of an inline image (issue 8798)
#8712 Adds node.js logic for networking tasks for PDF.js
π¦ #8822 Disable node libs in pdfjs-dist package.json
π #8824 Prevent an infinite loop inXRef.readXRef
by keeping track of already parsed tables (bug 1393476)
π #8819 Remove any mention ofcompatibility.js
from the "Getting Started" docs (issue 8818)
#8817 Set this.isCancelled in close method of streamSink.
π #8820 Remove the ability to pass ascale
parameter in the (optional)args
object parameter ofPDFViewerApplication.open(file, args)
β #8821 Replace the test-case for issue 8798 with a reduced one (PR 8800 follow-up)
π #8826 Enable thefor-direction
ESLint rule
#8825 Account for broken outlines/annotations, where the destination dictionary contains an invalid/Dest
entry
#8796 Implement text rise for the SVG back-end
#8829 Attempt to improve theEI
detection heuristics, for inline images, in streams containingNUL
bytes (issue 8823)
β‘οΈ #8831 Update thegulp minified
command to use uglify-es
π #8835 Ensure thatPDFViewerApplication.error
outputs proper messages in FIREFOX/MOZCENTRAL builds
#8768 Adds fetch stream logic for networking part of PDF.js
π #8845 Fixes autofetch and firefox nightly fetch streams
#8828 Improve the annotation code by converting to ES6 syntax and removing duplicate code
#8848 Correctly set thecredentials
of a fetch request, when thewithCredentials
parameter was passed togetDocument
β #8855 Add test for withCredentials option
0οΈβ£ #8847 Correct the default value forisRenderable
in theAnnotationElement
constructor, to fix breaking errors when rendering unsupported annotations
#8857 Avoid some redundant type checks inXRef.fetchUncompressed
βͺ #8859 Revert PDFPageView.pdfPage reset.
#8862 Replace theisInt
helper function with the nativeNumber.isInteger
function
#8864 Replace theisArray
helper function with the nativeArray.isArray
function
#8775 Re-writePDFHistory
from scratch
#8874 Fix the helloworld example by setting the PDFNetworkStream class (PR 8712 follow-up)
#8866 Correctly validate the response status for non-HTTP fetch requests (PR 8768 follow-up)
π #8877 Providechecked
styles for button widget annotations
#8885 Address a couple of edge-cases in the newPDFHistory
implementation (PR 8775 follow-up)
#8889 Replacevalue === (value | 0)
checks withNumber.isInteger(value)
#8868 Store the rotation in theViewHistory
/PDFHistory
(issue 5927)
π #8865 Hide unsupportedLinkAnnotation
s (issue 3897)
π #8691 Implement support for square and circle annotations
π #8892 Replacevar
withlet
inweb/genericcom
andweb/genericl10n
π #8891 ES6-ify the code inweb/firefoxcom.js
π #8893 Combine the common styles and overrides for the annotation layer reference tests
#8808 Fix color of image masks inside uncolored patterns
#8904 Provide a stub forsetAttribute
in order to use the SVG back-end with Node.js
β #8900 Use theSimpleLinkService
when running "annotations" reference tests
#8910 Fix #8888: Change behaviour of fetch to make it compatible with XHR.
#8913 For /Filter entries containingName
s, ignore the /DecodeParms entry if it contains an Array (issue 8895)
β #8909 CheckisEvalSupported
, and test thateval
is actually supported, before attempting to use thePostScriptCompiler
(issue 5573)
π #8917 Implement support for stamp annotations
#8919 Ignore 'change' events that didn't originate in the viewer (issue 8915)
π #8921 support tiff predictor for 16bit
#8901 CCITTFaxStream problem when EndOfBlock is false
0οΈβ£ #8938 Use font's default width even when 0. (bug 1392647)
π #8912 [api-minor] ReplaceDOMParser
withSimpleXMLParser
#8928 Fix #8907: Decode URL to get correct path in node_stream.
π #8949 Remove theinstanceof AlternateCS
check inColorSpace.parse
since it's dead code
#8932 JBIG2 symbol offsets
π #8950 Implement support for polyline and polygon annotations
#8724 Implement aPDFSinglePageViewer
class (issue 8188)
#8955 Overwrite maxSizeOfInstructions in maxp with computed value.
π· #8959 Ensure that the same exact version of PDF.js is used in both the API and the Worker
#8962 Check thatthis.baseUrl
is defined before attempting to fetch any data inDOMCMapReaderFactory
/NodeCMapReaderFactory
#8968 Split the existingPDFFunction
in two classes, a privatePDFFunction
and a publicPDFFunctionFactory
, and utilize the latter inPDFDocument
to allow various code to access the methods ofPDFFunction
#8976 Simplify the disabling of Node polyfills, ingulpfile.js
, since we're now using Webpack 3.x
#8971 Closes all promises/streams when handler is destroyed.
π #8979 Transform Web Archive URLs to avoid downloading an HTML page instead of the PDF file
β‘οΈ #8977 Update all packages to the most recent version
β‘οΈ #8981 Update translations
π #8983 Remove unused helper code
#8980 Add CDN links
#8990 Added component example for single page viewer
#8994 Fix a regression that (effectively) makesPDFHistory.forward
a no-op
βͺ #9002 Revert "Closes all promises/streams when handler is destroyed."
#9001 Prevent theannotationLayer
from, in some cases, becoming duplicated on the first page when the document loads
π #8922 AllowgetOperatorList
/getTextContent
to skip errors when parsing broken XObjects (issue 8702, issue 8704)
π #9008 Mispelled isEvalSupported property at FontFaceObject() creation.
π #9009 Only warn about unsupported JavaScript, in the viewer, when non-empty actions exist (issue 5767)
#9013 Fix aPDFHistory
regression with document hashes of thenameddest=...
form
#9027 Replace ourWeakMap
polyfill with the one from core-js
π #9029 Enable the--report-unused-disable-directives
ESLint command line option
π #9031 Remove all warning/fallback code for obsolete method signatures inweb/
files
#9040 Remove theenableHandToolOnLoad
preference migration code inweb/pdf_cursor_tools.js
JavaScript exists
#9044 Use charstring as plain text when lengthIV is -1.
π #9032 Simplify the check, and remove the warning, for thenativeImageDecoderSupport
API parameter
#9052 Attempt to clarify the meaning of "extension" in the ISSUE_TEMPLATE
#9054 Replace ourPromise
polyfill with the one from core-js
#9055 ReplaceNumber
polyfills with the ones from core-js
π #9058 Replace a few occurences ofvar
withlet
in already ES6 converted web/ files
π¨ #9057 Uselet
/const
instead ofvar
in the printing code
#9061 Adds ECCN response statement
#8986 Version 1.10
#9045 Sanitize name index in compile phase of CFF.
#9046 Extract the actual decoding inCCITTFaxStream
into a newCCITTFaxDecoder
"class", which the newCCITTFaxStream
depends on
#9072 UsestringToBytes
in more places -
v1.9.426 Changes
August 14, 2017π Changes:
#8281 v1.8.188
π #8131 ES6 modules: remove UMD header validation
#8240 [api-minor] Always allow e.g. rendering to continue even if there are errors, and add astopAtErrors
parameter togetDocument
to opt-out of this behaviour (issue 6342, issue 3795, bug 1130815)
π #8203 Convert the files in the/web
folder to ES6 modules
π¦ #8286 Changing package.json version to 1.0.0
π #8283 Moves Uint32ArrayView and hasCanvasTypedArrays into compatibility.js.
#8285 Change amd to cjs path in ES6 modules
#8287 Allow to convert (some of) ES6 code to ES5.
π #8289 Firefox extension: remove unused preference cleanup frombootstrap.js
π #8288 Moves 'web' target to the gulpfile.
#8291 Ensure thatPDFThumbnailView.draw
is able to handleRenderingCancelledException
correctly (PR 8157 follow-up)
#8293 Convert the password prompt to ES6 syntax
π #8295 UsecreatePromiseCapability
in/web
files and avoid unnecessaryPDFPageView.setPdfPage
calls
#8294 Convert the files in the/src/display
folder to ES6 modules
#8296 Convert the document properties to ES6 syntax
#8297 Convert the find bar to ES6 syntax
π #8299 ImportgetGlobalEventBus
correctly fromweb/dom_events.js
in various/web
files, to un-break e.g. the viewer components (PR 8203 follow-up)
π¨ #8300 Refactor theDownloadManager
initialization inGENERIC
/CHROME
builds again (PR 8203 follow-up)
π #8311 [Firefox addon] Upstream changes from: Bug 1356569 - Remove optional trailing parameters (issue 8310)
π #8312 Moves dist and minifiedpost tragets from make.js.
π #8315 Remove thesignchromium
target frommake.js
#8313 [Firefox addon] Upstream changes from: Bug 1346616 - Migrate callsites that are retrieving requested locale from pref, to use LocaleService::GetRequestedLocales
π #8321 ChangegetPDFFileNameFromURL
to ignoredata:
URLs for performance reasons (issue 8263)
π¨ #8322 [Firefox addon] Remove thewindow.FirefoxCom
hack fromweb/viewer.js
, since it was made redunant by thesetExternalLocalizerServices
refactoring (PR 7202 follow-up)
π #8323 Change theimportl10n
script to use the Beta channel, since Aurora is being removed
#8302 Convert the attachments/outline view to ES6 syntax
#8306 Convert the sidebar to ES6 syntax
#8303 Convert thePreferences
to an ES6 class
π #8328 Makefile: remove unusedmozcentralcheck
target
#8339 Convert theViewHistory
to an ES6 class, and re-factor it to make it properly asynchronous
β #8331 Enable running theui_utils
unit-tests on Travis
π #8324 Convert the annotation layer builder, presentation mode and rendering queue to ES6 syntax
π #8332 Enable theobject-shorthand
ESLint rule insrc/shared
andsrc/display
β #8345 Bots: disable the default browser test and enable E10s
βͺ #8346 Restore theURL.createObjectURL
check to thecreateObjectURL
utility function (issue 8344)
#8348 Add the commit hash to theREADME.mozilla
file (issue 8347)
#8309 Allow use versions for pdf.js script (i.e. - pdf.js?2412313)
π #8352 Removes builder.build().
#8335 Subtract the X/Y offsets when decoding refinement regions of JBIG2 images (issue 7145, 7308, 7401, 7850, 8270)
π #8351 Enable theobject-shorthand
ESLint rule inweb
π #8342 Enable theobject-shorthand
ESLint rule insrc/core
β #8298 Convert the files in the/test/unit
folder to ES6 modules
#8354 [Firefox addon] Replace abind(this)
statement with an arrow function inPdfStreamConverter.jsm
(issue 8343)
π #8353 Enable theobject-shorthand
ESLint rule
#8355 Replace unnecessarybind(this)
andvar self = this
statements with arrow functions insrc/core/evaluator.js
#8349 Migratemake.js
togulpfile.js
#8357 Replace unnecessarybind(this)
andvar self = this
statements with arrow functions in remainingsrc/core/
files
#8361 Export LoopbackPort
π· #8363 Adds initializeFromPort to the WorkerMessageHandler.
#8364 Adds babel caching for system.js.
#8359 Ignore line-breaks between operator and digit inLexer.getNumber
0οΈβ£ #8369 Add no-default-browser-check to chrome runner.
#8370 Replace unnecessarybind(this)
andvar self = this
statements with arrow functions in remainingsrc/
files
#8358 Change the signatures of thePartialEvaluator
"constructor" and itsgetOperatorList
/getTextContent
methods to take parameter objects
π #8377 Replace unnecessarybind(this)
statements with arrow functions inweb/
files
#8378 Convert the files in the/src/shared
folder to ES6 modules
#8340 Fix char spacing bug in SVG mode
#8368 Enables source maps for webpack generated files.
#8385 Fix typo in LoopbackPort export
#8381 Re-factorPDFDocumentProperties
such that it's properly reset when a new PDF file is opened (issue 8371)
#8387 amends Babel cache (#8364) implementation to also work on Safari
#8390 Upstream changes from: Bug 1319111 - Expose result principal URL ("final channel URL") on LoadInfo, convert current consumers of LOAD_REPLACE
π #8393 Replace unnecessaryvar self = this
statements with arrow functions inweb/app.js
#8391 Convert the hand tool, interfaces and secondary toolbar to ES6 syntax
#8350 [api-minor] Fix svg image render
#8397 SimplifyextractText
, and replace unnecessaryvar self = this
statements with arrow functions, inweb/pdf_find_controller.js
β #8399 Wait untilPDFDocumentLoadingTask.destroy
is resolved before callingdone
in the API unit-tests
β #8400 Wait for previous pdfDocument(s) to be destroyed before running the next reference test
#8398 Convert theDOMCMapReaderFactory
andDOMCanvasFactory
to ES6 classes
β #8258 Enable running a subset of the API unit-tests on Travis
π #8406 Gracefully ignore transaction failure in plugin-babel-cached
#8411 Replace unnecessaryvar self = this
statements with arrow functions inweb/pdf_page_view.js
andweb/pdf_thumbnail_view.js
π #8417 Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file.
#8413 [api-minor] Adds additional parameter so background color of canvas can be set
#8388 Cache JPEG images, just as we do for other image formats, inevaluator.js
(issue 8380)
βͺ #8420 Revert "Upstream changes from: Bug 1319111 - Expose result principal URL ("final channel URL") on LoadInfo, convert current consumers of LOAD_REPLACE"
#8421 Change theimportl10n
script to use the Nightly channel
π #8366 Removes shelljs
π #8431 Replace a couple of leftovermake.js
references withgulpfile.js
in docs/comments
#7635 Unify handling of various cursor tools, e.g. the current Hand Tool and a possible future Zoom Tool, in a newPDFCursorTools
module
π #8432 Remove the special handling fornameddest
s that look like standard pageNumbers
π #8433 Remove the reference tocompatibility.js
from the README, since it's included by default inGENERIC
builds
#8436 Don't map glyphs to the HANGUL FILLER (0x3164) Unicode location (issue 8424)
0οΈβ£ #8437 Resets canvas 2d context to the default state.
#8442 Add different code-paths to{CMap, ToUnicodeMap}.charCodeOf
depending on length, sinceArray.prototype.indexOf
can be extremely inefficient for very large arrays (issue 8372)
π¨ #8416 Refactor and ES6-ifyPDFLinkService.navigateTo
β‘οΈ #8452 Update webpack.js to support browsers that do not have the Web Workers API
#8450 Convert the overlay manager to ES6 syntax
#8284 Convert the files in the/src/core
folder to ES6 modules
#8455 Convert the page view to ES6 syntax
#8458 Refactor thegetTempCanvas
function inpdf_thumbnail_view.js
to a factory, in preparation for ES6 conversion of the thumbnail related code
π #8462 Removes last UMDs from the modules.
π #8463 Allow specifying thePDFJS_NEXT
build flag via an environment variable when running the variousgulp
commands
#8396 Adds streams-lib polyfill and exports ReadableStream from shared/util.
#8394 Wraps mozL10n to async calls; splits firefox and generic l10n libs.
0οΈβ£ #8466 Add a stubcreateL10n
toDefaultExternalServices
in app.js
π #8470 Fix inconsistent spacing and trailing commas in objects inextensions/
files, so we can enable thecomma-dangle
andobject-curly-spacing
ESLint rules later on
π #8469 Fix inconsistent spacing and trailing commas in objects inweb/
files, so we can enable thecomma-dangle
andobject-curly-spacing
ESLint rules later on
π #8477 Fix inconsistent spacing and trailing commas in objects intest/
files, so we can enable thecomma-dangle
andobject-curly-spacing
ESLint rules later on
π #8475 Fix inconsistent spacing and trailing commas in objects in remainingsrc/
files, so we can enable thecomma-dangle
andobject-curly-spacing
ESLint rules later on
π #8474 Fix inconsistent spacing and trailing commas in objects insrc/core/
files, so we can enable thecomma-dangle
andobject-curly-spacing
ESLint rules later on
π #8478 Fix the remaining cases of inconsistent spacing and trailing commas in objects, and enable thecomma-dangle
andobject-curly-spacing
ESLint rules
#8482 Convert the thumbnail view/viewer to ES6 syntax
#8483 Convert the find controller to ES6 syntax
#8467 Bug 1353029 - Pass PdfJs.enabled into child on change.
#8499 Prevent console errors when clicking to change page while in Presentation Mode (issue 8498)
#8430 Adds sendWithStream method in MessageHandler.
#8441 Ensure thatTilingPattern
s have valid (non-zero) /BBox arrays (issue 8330)
π· #8508 Fixes duplicate creation of PDFWorker for the same port.
#8510 Prevent the Zoom dropdown from intermittently displaying an incorrect custom scale in Firefox (PR 8394 follow-up)
#8517 Additional check in globalScope detections
π¦ #8401 Adds gulp dist-install command; using pdfjs-dist package in examples.
#8519 Preventing from using the same canvas for multiple render()
π· #8522 Fixes WeakMap polyfill (and improves PDFWorker port check).
β‘οΈ #8531 RemovePDFPageView.updatePosition
since it's not actually necessary
#8515 Adds special case for origin of blob to the compatibility URL.
π #8525 Allow for unbinding of events in web application
#8535 ResetpageRotation
anddownloadComplete
inPDFViewerApplication.close
π #8539 Remove a redundantPDFViewer.currentScale
call fromPDFViewerApplication.load
π¨ #8536 RefactorObjectLoader
to useDict
s correctly, rather than abusing their internal properties
#8543 Add getAttributeNS to domstubs for SVG example
#8544 compatibility.js: Rename parameters in JURL
#8537 Convert the toolbar to ES6 syntax
#8540 Reduce memory requirements of pdf2svg.js example to avoid OOM
#8552 Ensure canvas is really hidden when used with pdfjs-dist.
#8556 Stop tracking the rotation inPDFViewerApplication
and directly usePDFViewer.pagesRotation
instead
π #8542 Move svg:clipPath generation from clip to endPath
β‘οΈ #8561 Don't use a hidden canvas when constructing thezoomLayer
inPDFPageView.update
#8567 Fix error when using custom CMapReaderFactory
#8488 Streams get text content
0οΈβ£ #8507 Only special-case OpenType fonts withCFF
data if it's both a composite (i.e. Type0) font and also has a non-default CID to GID map (issue 8480)
0οΈβ£ #8571 Mention in the "Getting the Code" section of README.md that an ES6 compatible browser is required when using the default viewer withgulp server
#8564 SVG: implement fill and stroke opacity
β‘οΈ #8576 Remove theselectScaleOption
helper function, inToolbar._updateUIState
, and simply inline its code instead
π #8574 SVG: move setting the stroke properties to thestroke
method
π #8578 ES6-ify the code inweb/ui_utils.js
#8589 Fix missing notdef in expert encoding.
π #8582 Convert the text layer builder to ES6 syntax
π #8583 ES6-ify the code inweb/app.js
andweb/viewer.js
π· #8585 Check that theMessageHandler
isn't already terminated in theonFailure
handler insrc/core/worker.js
(issue 8584)
#8592 Only mask char codes of (3, 0) cmap tables in the range of 0xF000 to 0β¦
π #8594 Changevar
tolet
, and use object destructuring, in a couple of previously class convertedweb/*.js
files
#8580 Fix how we detect and handle missing glyph data.
π #8596 Fixes wrong structure of fullReader.read() result.
π #8615 Fix a stupid spelling error in theASCII85Decode
name inParser.makeInlineImage
(issue 8613)
#8555 Don't allow setting various properties, such ascurrentPageNumber
/currentScale
/currentScaleValue
/pagesRotation
, before{PDFViewer, PDFThumbnailViewer}.setDocument
has been called
π #8621 Bump minimum eslint version to 3.19.0
π #8581 Removes error()
#8630 Remove pdfjsdev_webpack , use webpack options
#8643 AddNumber.isNaN
andNumber.isInteger
polyfills in compatibility.js, since the Streams polyfill relies on them
π #8646 Fixes pdf.js library source detection.
#8640 Check for undefined
#8609 Ensure thatPDFFindBar._adjustWidth
is called in all situations where the width of the findbar might have changed
β‘οΈ #8634 Update inconsistent names
π #8618 Remove the scale-not-initialized hack fromwebViewerResize
(in app.js)
β‘οΈ #8641 Update ESLint (and eslint-plugin-mozilla) to the latest version
#8620 Improve compression of PNG images embedded in generated SVG files
#8649 ConvertPDFLinkService
to an ES6 class
#8651 Fix display_svg_spec tests.
#8636 ConvertPDFViewer
to an ES6 class
π» #8653 Add UI for the cursorToolOnLoad pref in the Chrome extension + migration logic
#8678 Fix a typo, in theCatalog.numPages
getter, than prevents shadowing from working correctly
#8638 Insrc/core/jpg.js
, ensure that the Adobe JPEG marker always takes precedence, even when the color transform code is zero
π #8684 Remove mostassert()
calls (issue 8506)
π #8673 [api-minor] Add support for PageMode in the API and viewer (issue 8657)
β‘οΈ #8689 Update README.md
β #8692 Add a reduced test-case for issue 7696
#8696 Adds ready capability rejection logic for stream sink.
#8666 Fix TypeError that occurs in colorspace.js on accidentally passing an 'Array' instead of 'TypedArray'
#8698 Add a fallback for non-embedded SegoeUISymbol font (issue 8697)
π #8617 Adds Streams API support for networking task of PDF.js project.
#8715 Use streams-lib as polyfill
β #8611 Add unit-tests for colorspace.js
π #8717 Move theXRefMock
in the unit tests to a central location
#8718 Ensure that the loadingBar isn't displayed again when the entire file has already been fetched
#8722 Fix the helloworld example by importing thenetwork.js
file (PR 8617 follow-up)
#8721 Reduces the amount of data send via GetDocRequest.
#8627 Fallback on font widths if CFF data is broken
#8681 Fix several issues with glyph id mappings (issue 8668, bug 1383504)
π #8744 Checks Edge support for streams.
π· #8738 Delete workerPort to PDFWorker cache after PDFWorker destroy
#8745 Properly cancel streams and guard at getTextContent.
#8747 Fix two cmap related issues.
#8746 More robust getPage() error handling.
π #8752 ES6-ify the code inweb/dom_events.js
π #8756 Remove leftoverargs[0].code
checks from theOPS.paintXObject
cases in evaluator.js
#8761 Fallback to plain object for globalScope.
π #8762 Replace thecoded
property withisType3Font
when building the fontproperties
object inPartialEvaluator.translateFont
#8764 ConvertDownloadManager
to an ES6 class
#8749 Version 1.9