7.0 Changelog

Version 7.0 of PDF.js Express includes many new features (including a brand new UI), and a bunch of improvements and bug fixes!

There are also a few breaking changes, which are more closely discussed in the migration guide

Breaking changes

  • A new and improved default UI that is structured a bit differently. The previous UI is still accessible with the constructor option ui: 'legacy'.
  • All APIs now take 1-indexed page numbers. Previously some APIs would take 0-indexed page numbers.
  • Search constants have been moved to the CoreControls namespace.

Core

New

  • Updated the RubberStampCreateTool to allow the creation of custom stamps.
  • Updated the RubberStampCreateTool to allow setting a list of default stamps and custom stamps. These lists are used by default in the UI.
  • Added a count measurement tool which will track the number of count annotations on the document.
  • Properties and constants now consistently use the same casing throughout the WebViewer APIs. For example Namespace.MY_CONSTANT. The previous casings still remain for backwards compatibility.
  • Added support for displaying polyline line endings
  • Added AnnotationManager.getCopiedAnnotations API to get the list of annotations that are currently copied
  • Added a historyChanged event to AnnotationHistoryManager as well as the canUndo and canRedo functions.
  • Added a getContents API to the FreeText editor instance
  • Added a fitText API to FreeText and Callout annotations to programmatically fit the annotation to the text so that all text is visible
  • Added a new event that is fired when the active search result has changed

Fixes

  • Fixed issue where images with built in orientation data weren't being displayed upright in all browsers.
  • Fixed issue where widgets with the same name were not showing the formatted value correctly
  • Fixed issue where switching to a different tool when making a highlight annotation would leave the highlight annotation in the document
  • Fixed issue where deleting widgets from the document wasn't removing the field's reference to the widget
  • Fixed issue where rich text editor wasn't focused the first time in iOS devices
  • Fixed issue where typing in certain text areas in PDF causes the screen to flicker in IE11
  • Fixed issue with accented characters in freetext annotations being cut off
  • Fixed issue where undo/redo of a FreeText annotation would throw a warning message about appearance render
  • Fixed issue where setting the dropdownbox list via embedded JS did not work properly
  • Fixed issue where entity elements in XFDF could cause the XML parser to lock up
  • Fixed issue where calling getFileData on a doc instance that is created by CoreControls.createDocument would throw an error
  • Fixed issue with the overrideSelection property on tools
  • Fixed issue where some date formats weren't accepted by date fields
  • Fixed issue where the PDF.js worker was getting loaded multiple times
  • Fixed issue where form field font sizes were not properly set
  • Fixed issue where several pages of form fields were sometimes ignored

UI

New

  • New default user interface with improved grouping of tools and organization of components.
  • Added UI for creating custom stamps with different text, colors, date, time and user name.
  • Added a setCustomModal API
  • Added a count measurement tool button in the measurement group.
  • Updated the search panel to use a virtualized list for improved performance with many search results.
  • Added support for changing the color of signatures as they are created.
  • Added API to customize annotation tooltips
  • Added option to include or exclude annotation when printing
  • Added the MouseWheelZoom feature which allows disabling of zooming with the mouse wheel

Fixes

  • Fixed issue where the aspect ratio of thumbnails wasn't preserved in some cases
  • Fixed issue where the annotation layer that overlaps the thumbnails wasn't exactly aligned with the page content
  • Fixed issue where you can type past max/min zoom level and exposed APIs to get max/min zoom level
  • Fixed the swipe threshold so that swiping the pages worked better
  • Fixed issue with disabling FreeText editing on the page not working as expected