UNPKG

ngx-extended-pdf-viewer

Version:

Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.

359 lines 97.9 kB
- till 0.1.3 initial version based on the embeddable PDF-Viewer https://github.com/legalthings/pdf.js-viewer - 0.2.0 use Mozilla's pdf.js (https://github.com/mozilla/pdf.js) directly. Update to pdf.js 2.0.641. - 0.2.1 minor bugfixes - 0.2.2 Make the library compatible to the `--prod` build; improve the CSS locality - 0.3.0 Solved the timing issue; added options for internationalization; improved the documentation - 0.3.1 improved the documentation - 0.3.2 stop registering event listeners multiple times if the component is used multiple times; tentative bugfix that occurred when switching from a file with few thumbnails (i.e. pages) to another instance of the viewer showing a file with many thumbnails - 0.3.3 removed debug code and solved the bug causing crashing when switching to a new instance of <ngx-extended-pdf-viewe> - 0.3.4 removed debug code - 0.9.0 added options to hide every button from the UI - 0.9.1 tried to add a screenshot to the readme file - 0.9.2 managed to add a screenshot to the readme file - 0.9.3 removed debug code - 0.9.4 improved the documentation - 0.9.5 recompiled with Angular 7 and updated the peer dependencies, allowing for both Angular 6 and 7 - 0.9.6 updated to pdf.js 2.0.943; added more language files; fixed a bug preventing loading the language defined in a script tag for many language; repaired the parameter `[showSidebarButton]`; fixed broken i18n on OSX Chrome 70 by adding several translations for languages without region specifier (such as "es" instead of "es-ES") - 0.9.7 fixed the CSS file (font size and margins accidentially spilled to the surrounding page); corrected the link to the bug tracker - 0.9.8 make the option `[showSidebarOnLoad]` configurable; plus, don't load a sidebar if `[showSidebarButton]="false"`. Kudos go to GitHub user AlexandrosG. Stop the PDF viewer from crashing if the page is left before the PDF is rendered (issue #9). Kudos go to GitHub user Max Dertcaf. Prevent auto-completion in the search input field because it sometimes shows user names and email addresses (#8). Kudos go to Paul Kocher. Also added the optional property `[zoom]`. - 0.9.9 added the attribute `[mobileZoom]`; repaired the paginator buttons after hiding and re-displaying the PDF viewer; reduced the memory leaks of the `pdf.js` viewer (work in progress); documented how to use ngx-extended-pdf-viewer with tabs - 0.9.10 adjust the position of the document and the thumbnails after increasing the size of the toolbar via `[mobileZoom]="200%"`; implemented the two-way-binding of the `[zoom]` attribute - 0.9.11 Now the `[zoom]` attribute is also respected when a new document is loaded in the same instance of the PDF viewer - 0.9.12 fixed the IE11 compatibility of `[mobileFriendlyZoom]` (dirty hack / temporary solution); correct positioning of the findbar when the sidebar is disabled - 0.9.13 Added some documentation about how to use a `Blob` (e.g. a PDF file downloaded from the server); fixed #21 (progress bar wouldn't hide on any instance of `<ngx-extended-pdf-viewer>`except for the fist instance) - 0.9.14 #24 fixed the IE11 compatibility of `[zoom]` - 0.9.15 #27 removed the "j" hidden in the HTML code; updated to PDF.js 2.1.266; # fixed a few bugs in the library README.md and mentioned it in the README.md of the root project; #37 mentioned the memory footprint; #39 updated / corrected the "how to build" instructions - 0.9.16 #45 allow percentage for the `height` option - 0.9.17 #40 added an option for the hand tool; #48 improved the documentation concerning Bootstrap; the `[zoom]` attribute now reacts to changes after loading the PDF viewer (previously: only at load time) - 0.9.18 #49 documented IE11 compatibility with polyfills; #25 implemented the two-way binding attribute `[(page)]` to select the page to display - 0.9.19 #35 add an option to override the default file name after clicking the "download" button; #34 implemented (pagesLoaded); fixed the `[page]` attribute which always showed page 13 on startup; reduced the timeout to set the initial `[page]`; removed debug code - 0.9.20 #55 if the setting `"height=100%"` results in a container with 0 pixels height, the PDF viewer automatically resizes to fill all available space.; #38 initial support for `[(spread)]` (work in progress!) - 0.9.21 #56 made the `[src]` attribute more flexible. Now it also accepts `Blobs`, `Uint8Arrays`, and `ArrayBuffers`. Also added a new attribute, `[base64Src]`, to display PDFs encoded as base64 encoded strings - 0.9.22 #29 `[backgroundColor]` can now be set to "white" or "#ffffff". Until 0.9.21, pdf.js always converted white to off-white. I am still trying to understand what is going on, so there might be side-effects. However, my tests did not reveal such side-effects yet. - 0.9.23 #38 fixed the `[spread]` attribute, and made the `[height]` property more reliable - 0.9.24 #57 added the documentation to get the PDF viewer up and running on JHipster - 0.9.25 fixed the formatting of the README file - 0.9.26 mentioned the showcase; added the missing documentation of (pagesLoaded); updated to Angular 8.0.0-rc.4 - 0.9.27 updated to Angular 8.0.0-rc.5; reduced the z-indices - 0.9.28 #72 added `[password]` - 0.9.29 #51 added `[nameddest]`; #71 added `listenToURL` and deactivate the hash listener by default - 0.9.30 #38 improved the attribute `[spread]`; now it works's more reliable (although it's still not perfect, because sometime the PDF file is already shown before applying the correct spread mode); also successfully tested `(spread)`. Now `[(spread)]` is a two-way-binding attribute. - 0.9.31 #60 added the attribute `language` and repaired the language resolution algorithm - 0.9.32 #81 implemented `(pageRendered)` - 0.9.33 #82 sometimes the code initializing the app is called before the app is completely configured. Added code to deal with both early and late calls. - 0.9.34 #12 fixed a minor memory leak. - 0.9.35 #67 revisited: reduced the `z-index` of the toolbar to 7. Now every `z-index` is below 11. - 0.9.36 `[mobileFriendlyZoom]` can now also be 'true' (= '150%') or 'false' (= '100%'); #85 now the zoom buttons are hidden if you want them to be hidden, even if you're using an iPad - 0.9.37 #85 reverted the bugfix because it's a bug itself - 0.9.38 #85 addressed the real bug: now the pdf viewer toolbar is responsive on small screen even if the pdf viewer covers only part of the screen width - 0.9.39 fully automated the process to update to a new version of `pdf.js`; added `pdf.js 2.2.222` as an optional preview version; added pull request #76 (additional null checks and type checks) - 0.9.40 #84 fixed `[zoom]` (didn't work on page load) - 0.9.41 #33 implemented a service to call `find()`, `findNext()`, and `findPrevious()` programatically - 0.9.42 #33 added the documentation for the `find()` service and published `NgxExtendedPdfViewerService` (possibly work in progress) - 0.9.43 #86 compile the library with Angular 7 because compiling it with Angular 8 breaks backward compatibility - 0.9.44 #87 wait until the localization event has been fired before opening a PDF file - 0.9.45 #87 added error messages to make `useBrowserLocale` less confusing - 0.9.46 #90 fixed the default value of `[zoom]`; corrected the documentation - 0.9.47 #88 deactivate the text layer by default; it's only active if `[showHandToolButton]="true"`; removed `[showSelectToolButton]` in favor of `[showHandToolButton]`; optimized the way the PDF viewer is configured; breaking change: `[showHandTool]` now is false by default, while `[handTool]` is true by default - 0.9.48 #95 if the user defines a button to be hidden, it should remain hidden even if responsive design indicates there's enough space to show it. - 0.9.49 #91 one of the validation checks introduced with 0.9.45 stumbled over a DOM node added by ngx-extended-pdf-viewer itself; 0.9.49 fixes that - 0.9.50 #86 documented how to use ngx-extended-pdf-viewer with Angular 5 / Ionic 3; updated the preview version of `pdf.js` to 2.2.222 and replaced the ES5 version of these files by the debugger-friendly ES2016 version - 0.9.51 #80 changed the change detection strategy to "on push" to reduce CPU load. Mentioned that the "find" function become slow in very large documents (above 10 MB and 500 pages). - 0.9.52 #96 starting with 0.9.47, the attribute `filenameForDownload` was partially broken. 0.9.52 fixes that. - 0.9.53 #101 stop overwriting `window.print()` by renaming `print()` to `printPDF()`. This is an experimental feature, so currently only the preview JS file `viewer-2.2.222.js` is modified. The 2.1 file is going to be changed after checking for detrimental side-effects. - 0.9.54 Updated to `pdf.js 2.2.226`. #101 now the print service of the PDF viewer is properly deactivated when the `<ngx-extended-pdf-viewer>` widget is detroyed. Standard printing is reactivated. Also see https://github.com/mozilla/pdf.js/issues/10948 and https://github.com/mozilla/pdf.js/issues/10946 - 0.9.55 #103 finished the migration of responsive design to JavaScript in order to support PDF viewers that have less then the full window width available; added the flag ignoreResponsiveCSS to allow users to deactivate this features; set the flag `[ignoreResponsiveCSS]` to sensible default values depending on the available window width - 1.0.0-rc.1 #103 implemented the ngOnChanges bit of `[ignoreResponsiveCSS]` so the showcase can demonstrate the effect of returning to the CSS-only approach - 1.0.0-rc.2 #105 when the user downloads a document, the event `(pdfDownloaded)` is fired. #104 fixed the print overlay which didn't work after creating a second instance of the pdf viewer. Updated the JavaScript files from version 2.1.266 to 2.2.228 of Mozilla's PDF viewer. - 1.0.0-rc.3 #17 reduced the memory leak - 1.0.0-rc.4 #113 added an option to suppress the context menu when the right-hand side button is clicked - 1.0.0-rc.5 #113 restored IE11 compatibility by adding the ES5 files `pdf-es5.js`, `pdf-worker-es5.js`, and `viewer-es5.js`. #115 now `[mobileFriendlyZoom]` also works on Firefox. - 1.0.0-rc.6 #116 now text selection works when `[handTool]="false"` and `[showHandToolButton]="false"` - 1.0.0-rc.7 #118 corrected the width and the position of the secondary toolbar (which was broken by fixing #115 in 1.0.0-rc.5). Tested with Firefox, Chrome, and Safari on OSX. IE11 compatibility is yet to be tested, it may or may not be broken. - 1.0.0-rc.8 #118 tested with Edge and IE11. Removed the temporary IE11 hacks. Fixed a bug with `mobileFriendlyZoom="1.7"` (using floating point numbers instead of percentages resulted in layout glitches). - 1.0.0-rc.9 #117 added the SVG images to the assets folder; introduced `imageResourcesPath` to allow for even more flexibility - 1.0.0 minor formatting improvements in the README file - 1.0.1 #124 made the CSS selector of the progress bar more specific - 1.0.2 #120 made `[page]` more reliable; sometimes the initial setting was ignored when the page loads slow - 1.1.0 #125 added `(currentZoomFactor)`; `(zoomChanged)` now also fires when the user selects "auto" - 1.1.1 #126 up/down keypress shouldn't move the focus away from the current input field. - 1.2.0 #127 add an option for setting the print resolution; #126 bugfix (forgotten `this` keyword); #129 added `(afterPrint)` and `(beforePrint)` - 1.3.0 #130 add the events `pdfLoaded` and `pdfLoadingFailed`. Thanks a lot to Taras Mogilyak for providing this pull request! - 1.3.1 #135 `[base64Src]` now redraws the PDF file when the input has changed; #126 up/down keypress shouldn't move the focus away from the current input field (didn't work in all cases); - 1.4.0 #134 implemented `[(rotation)]`; #133 implement (src) - 1.5.0 #136 fixed the configuration so it's possible to use the service worker thread; #132 added `(handTool)`; #131 added `[(sidebarVisible)]` - 1.5.1 #136 made the `defaultOptions` accessible to IE11 users can configure the worker thread URL; fixed the error message "Invalid pages rotation angle." - 1.5.2 #142 now the PDF viewer can be used in a form - 1.5.3 #148 override any custom settings of `overflow-y` on `<html>` and `<body>` when printing (because `overflow-y: hidden` used to clip the print output); preliminary fix of #147 - 1.6.0-rc.0 continued fixing #147: modified behaviour of (page); make a difference between [(page)] and [(pageLabel)]; - 1.6.0-rc.1 #150 stop loading a generic translation file (e.g. "en.properties") if there's a more specific translation file (e.g. "en-GB.properties") - 1.6.0-rc.2 #150 stop loading a generic translation file (e.g. "en.properties") if there's a more specific translation file (e.g. "en-GB.properties") (this time for real) - 1.6.0 #137 Now both `(currentZoomFactor)` and `(zoomChange)` react to the keyboard events CTRL + "+" and CTRL + "-". Caveat: after selecting one of the text settings of the dropdown menu (i.e. "page fit", "actual page", and so on), the `(zoomChange)` event fires twice. Another caveat: this change might be a breaking change (although I don't think so, but it's a major internal change). - 1.6.1 #152 now the viewer can print even if it's embedded in a Bootstrap modal. Most likely, this also fixes problems with other frameworks. - 1.6.2 #152 improved compatibility with Bootstrap (and many other scenarios). Now the sidebar does show on the left-hand side of the PDF viewer when it's hidden. Plus, the box model of the sidebar now is always the browser default (i.e. "content-box"), even if Bootstrap or another framework tries to modify that. - 1.7.0 Announced compatiblity to Angular 9. #154 added a polyfill for IE11. - 1.7.1 #143 Prevent Angular Material's MatDialog messing up printing. - 1.7.2 #160 improved the confusing message "no resource to load, early way out" - 1.7.3 #149 implement `[ignoreKeyboard]`, `[ignoreKeys]`, and `[acceptKeys]`; #165 prevent the `ExpressionChangedAfterItHasBeenCheckedError` when the page width changes - 1.7.4 #149 improved `[ignoreKeyboard]`, `[ignoreKeys]`, and `[acceptKeys]` with more key bindings; started to document the feature at https://pdfviewer.net/keyboard - 1.7.5 #149 improved `[ignoreKeys]` and `[acceptKeys]` with more key bindings and with multiple modifiers (such as CTRL+ALT+G) - 1.7.6 #167 restrict the list of files that can be opened in the "open file" dialog to PDF files (can be overwritten by the user, so that's no breaking change) - 1.7.7 #169 fix a Angular 9.0.0-rc.1 bug by removing the context menu additions of the presentation mode that were only visible in Firefox (`menuitem` is a defined tag in Firefox, but not in Chrome or Safari, and the current RC1 of Angular gets confused by that) - 1.8.0-rc.0 update to pdf.js 2.3.200; #168 and #170 fix printing (was broken after updating to pdf.js 2.3.200; stop printing empty pages at the end) - 1.8.0-rc.1 #171 added preliminary support for displaying signature. Published it as an RC because this pdf.js feature is experimental, so there should be an option that switches the feature off by default. This is going to land in 1.8.0. - 1.8.0-rc.2 #171 implemented `showUnverifiedSignatures` - 1.8.0-rc.3 #171 bugfixes and #168 updated the IE11 versions of the JavaScript files to pdf.js 2.3.200 - 1.8.0 #178 fixed [sidebar]; deprecated [sidebarOnLoad]; #177 added an option to ignoring accents and diacritics to the find dialog; #162 added more options to the `NgxExtendedPdfViewerService.find()` - 1.8.1 #184 added the parameter `logLevel` and improved font-related messages; #186 added "ngx-extended-pdf-viewer" to the startup-message; #162 the new options parameters of `find()` should have a default value - 1.8.2 #183 implemented `(updateFindMatchesCount)` and `(updateFindState)` - 1.8.3 #187 add `textLayer` to enable users to activate the text layer even if `[handTool]="true"`; #185 added lodash.deburr to the library (so now it should be added automatically to your node_modules folder) - 1.8.4 #187 hide the "find" button and the "selection mode / hand tool" menu when the text layer is disabled; report a warning on the JavaScript console if the settings of `textLayer` and `showFindButton` / `[handTool]` / `[showHandToolButton]` don't match to each other - 1.8.5 #177 added a few custom translations - 2.0.0-alpha.0 #188 load the pdf.js files lazily by default; #186, #179, and #157 refactor the HTML code in order to make it easier to customize the toolbar (work in progress) - 2.0.0-alpha.1 #194 add an option to display the PDF file without the border. Kudos to Balaji Sivaraman for contributing this pull request! - 2.0.0-alpha.2 #194 renamed the option to `[showBorders]="'true'"`. Kudos to Balaji Sivaraman for contributing this pull request! - 2.0.0-alpha.3 #201 added an option to find multiple texts. - 2.0.0-alpha.4 #201 improved the option to find multiple texts and added the programmatic API - 2.0.0-alpha.5 #201 polished the option to find multiple texts - 2.0.0-alpha.6 #206 fixed a bug that prevented the findbar from being shown; running the search again when opening the find bar for the second time - 2.0.0-alpha.7 #205 emit the error listener `(pdfLoadingFailed)` even if the user loads a buggy PDF file later (using the UI) (potentially breaking change) - 2.0.0-alpha.8 #208 add the CMAP files required by some PDF files written in East Asian languages - 2.0.0-alpha.9 #193 suppress or enable zooming with the mouse wheel via the keyboard settings `[acceptKeys]` and `[ignoreKeys]` - 2.0.0-alpha.10 #193 suppress or enable zooming with the mouse wheel via the keyboard settings `[acceptKeys]` and `[ignoreKeys]`; #179 and #159 preliminary support for customizing the UI - 2.0.0-alpha.11 #211 remove the gloss effect of the zoom dropdown in Safari; remove the duplicate drop-down-arrays (which may or may not have been caused by updating @angular/material) - 2.0.0-alpha.12 #213 compatibility to Angular Universal - 2.0.0-alpha.13 #179 and #159 preliminary support for customizing the UI (activated [customFindbarButtons]) - 2.0.0-alpha.14 #179 and #159 improved support for customizing the UI (`[customToolbar]`, `[customFindbarButtonscustomFindbarInputArea]`, `[customSecondaryToolbar]`). If everything went according to the plan, you shouldn't notice any difference unless you're using the new features. - 2.0.0-alpha.15 #179 and #159 add the new components to the public API - 2.0.0-alpha.16 #226 prevent a NPE that sometimes shows when the PDF viewer is hidden and shown again. - 2.0.0-alpha.17 #227 add `[enablePrint]`. Setting this options prevents printing entirely. - 2.0.0-alpha.18 #179 and #159 add dummy versions of missing widgets automatically to make customization easier - 2.0.0-beta.0 #186 replaced some toolbar icons by Material Design icons to distinguish the design from the native Firefox PDF viewer - 2.0.0-beta.1 #192 add interfaces for the underlying PDF viewer; #186 reduced the margins and paddings around the buttons - 2.0.0-beta.2 #186 fixed the positions of the secondary menu, the findbar, and the sidebar that were broken in the mobile-friendly view - 2.0.0 #228 removed the obsolete peer dependency to lodash.deburr that confused yarn - 2.1.0-beta.0 #200 added a smart algorithm to detect when to show or hide the secondary menu button (the kebab at the right-hand-side). This algorithm also copes with custom toolbars. - 2.1.0-beta.1 #200 fixed the functionality introduced with the previous beta version. Plus, stop overwriting the attribute `[showSecondaryMenu]` by a calculated value. So developers have better control over when to show or hide the secondary menu kebab button. - 2.1.0 #200 removed debug code, and added extra code to hide the secondary toolbar reliably on startup it it's empty. - 2.1.1 #200 simplified and improved the implementation - 2.1.2 #237 fixed the circular dependency introduced with #200 - 2.2.0-beta.0 #235 tentative implementation of the rotate buttons (preliminary implementation; icons are subject to change) - 2.2.0-beta.1 #235 tentative implementation of the rotate buttons (preliminary implementation) - 3.0.0-beta.0 #233 update to pdf.js 2.4.456; #235 shifted several buttons from the kebab menu to the main toolbar if available real estate allows; #239 fixed `(zoom)` (textual values like `auto`, `page-width`, `page-fit`, and `page-actual` should never be overwritten by numeric values) - 3.0.0-beta.1 #241 calculate the tab index programmatically; #233 made the find buttons visible again - 3.0.0-beta.2 #239 improved IE11 compatibility; #246 fixed a broken SVG image; #235 activate or deactivate buttons depending on the UI state in IE11 - 3.0.0-beta.3 #248 IE11 compatibility - 3.0.0-beta.4 #248 update the state of the "first page", "last page", and the "rotate page" buttons - 3.0.0-beta.5 #253 corrected a wrong interface; #251 slightly improved icon alignment (but responsive CSS is still broken with certain resolutions, so it's subject to change) - 3.0.0-beta.6 #235 improved and simplified the responsive CSS; got rid of the property `[ignoreResponsiveCSS]` - 3.0.0-beta.7 #235 hide and show the hand tool button and the select tool button only if the text layer is available - 3.0.0-beta.8 #251 better alignment of the zoom select box; #256 prevent NPEs - 3.0.0 #235 remove dynamic CSS when the component is destroyed; got rid of an accidental deep import of the rxjs Subject - 3.0.1 #260 bugfix: remove dynamic CSS properly - 3.1.0 #266 added `(textlayerRendered)` - 3.2.0 #266 renamed `(textlayerRendered)` to an all camel-case `(textLayerRendered)` (while keeping the old variant to avoid a breaking change); #269 prevent a crash when the search term consists of a single empty line (i.e. if it equals `"\n"`) - 3.2.1 #261 improved compatiblilty to the pre-Chromium versions of Microsoft Edge - 3.2.2 #257 allow for custom toolbars without zoom dropdown - 3.2.3 #278 fixed an accidental deep import - 3.2.4 #284 support custom deploy URLs (i.e. `<base href="/some-path">`) - 3.2.5 #277 prevent the password manager of the browser from activating when there's no password or when the PDF file is hidden; #262 added the `LinkTarget` interface - 3.2.6 #268 added the type definition for the `(textLayerRendered)` event; #286 mark toggled button in the primary toolbar - 3.2.7 #288 added `Blob` to the list of type of `[src]` - 3.3.0 #265 added `enablePinchOnMobile` (experimental / work in progress); #290 added `pdf-hand-tool` and `pdf-select-tool` to the public API; #289 added an error message if zone.js is outdated - 3.3.1 #290 added `pdf-hand-tool` and `pdf-select-tool` to the public API - 3.3.2 #294 added a check if the DOM element is there before checking its height; added a few fields to the `IPDFViewerApplication` interface - 3.3.3 #294 accept string values for `[page]` - 3.3.4 #325 fixed an IE5 bug that disabled the "find" feature - 3.3.5 #293 fixed the event `(zoomChange)` - 3.4.0 #285 added an option to use the developer version of pdf.js 2.5 in order to display images correctly - 3.4.1 #285 fixed a misleading typo of the readme file - 3.4.2 #329 fixed the layout glitch of the zoom select box on IE11 - 3.4.3 added an API for version numbers - 3.5.0 #243 added an option to limit the print range - 3.5.1 #243 fixed the print button and the key binding CTRL+P; added an API to set the print range for the print button and for CTRL+P - 3.6.0 updated to pdf.js 2.5.207; removed the pdf.js 2.5 folder and replaced it with a 2.6 folder - 3.7.0 #234 shift the "next page" / "previous page" buttons to the secondary toolbar on small screens - 3.7.1 #234 disable the "previous/next" page menu item of the secondary toolbar more reliable - 3.7.2 fixed a typo preventing IE5 and Edge from printing - 4.0.0.alpha.0 #304 implemented a prototype of fuzzy search; start building pdf.js from a custom fork (https://github.com/stephanrauh/pdf.js); added source maps pointing to the original pdf.js source code; add minified files and load them by default; add [minified] to allow users to load the non-minified files - 4.0.0.alpha.1 fixed a bug that happened when combining "find ignore diacritics" and "find multiple words" - 4.0.0.alpha.2 #337 bugfix: disable the "previous/next" page menu item of the secondary toolbar when reaching the first / last page; #344 fixed the position of the findbar when the mobile-friendly zoom is active - 4.0.0.alpha.3 #348 added the changelog to the npm package - 4.0.0.alpha.4 #341 added an API to extract PDF pages as image or text - 4.0.0.alpha.5 #357 fixed IE11 compatibility (was broken by the fuzzy search) - 4.0.0.alpha.6 #385 added a programmatic API to the fuzzy search; #376 added `pdfDefaultOptions.assetsFolder` to allow for custom project directories; added the "bleeding edge" developer branch of pdf.js; renamed `defaultOptions` to `pdfDefaultOptions` (breaking change!) - 4.0.0.alpha.7 #360 tentative implementation of `[authentication]` (subject to change!) - 4.0.0.alpha.8 #360 another tentative implementation of `[authentication]` (subject to change!) - 4.0.0.alpha.9 #360 renamed `authentication` to `authorization` and added the attribute `httpHeaders` (subject to change!) - 4.0.0.alpha.10 #394 pass `authorization`, `httpHeaders`, `password`, and `logLevel` when `[src]` is changed (earlier versions forgot to send the options after loading the initial PDF files with the options) - 4.0.0.alpha.11 #341 the extract image / extract text API now uses Promises, so you can use it with async/await. - 4.0.0.alpha.12 #387 + #367 customizable `[zoomLevels]`; #387 added an additional browser check to select ES5 on iOS 12.4.5; #398 added `PDFDataRangeTransport` to the type list of `[src]` - 4.0.0.alpha.13 #387 + #367 added `[minZoom]` and `[maxZoom]`; updated the "bleeding edge" branch to the latest changes of pdf.js - 4.0.0.alpha.14 #387 if the zoom exceed the maximum canvas size supported by the browser, reduce it to the maximum the browser displays; moved loading the pdf.js file from the constructor to `ngOnInit()` because `[minifiedJSLibraries]` was ignored (might be a breaking change!) - 4.0.0.alpha.15 #238 added `[customSidebar]`; #157 added `customThumbnail` - 4.0.0 #157 added keyboard navigation to the thumbnails in the sidebar - 4.0.1 #408 fixed Chrome 83 compatiblity - 4.0.2 #408 fixed Chrome 83 compatiblity; #406 decare Angular 10 support officially - 4.0.3 #412 fixed `[showBorders]="false"` at load time and corrected the documentation - 4.0.4 #400 added `(thumbnailDrawn)` to make customizing and adding custom behavior to the thumbnails easier - 4.0.5 #404 send `(pageChange)` and `(pageLabelChange)` only if there's really a change; #358 added another version check to force iOS 12 and below to use ECMAScript 5 - 4.1.0 #370 added `[customFreeFloatingBar]` to allow for custom toolbars that can be positioned anywhere on the PDF viewer - 4.1.1 #437 more helpful error messages if the project is using an old version of zone.js. - 4.1.2 #449 added code to stop the - sometimes time-consuming - initialization when the component has already been destroyed - 5.0.0-alpha.0 #457 updated the "bleeding edge" version of the assets folder to pdf.js 2.6.384 and ran several smoke tests; added support for layers - 5.0.0-alpha.1 #435 improved encapsulation of the CSS code; #244 started to add color themes; implement early versions of the simplified dark and the light theme; #469 added support for the Perfect Scrollbar plugin - 5.0.0-alpha.2 #471 don't close the sidebar when another sidebar view is selected; #244 minor improvements of the layout - 5.0.0-alpha.3 support for forms; #244 minor improvements of the layout - 5.0.0-alpha.4 improved support for older browsers - 5.0.0-alpha.5 #244 now the secondary toolbar icons support every color theme - 5.0.0-beta.0 #244 now the scale dropdown supports every color theme - 5.0.0-beta.1 #478 fixed the CSS code for printing (broken by #435) - 5.0.0-beta.2 #479 `showSecondaryToolbarButton` did exactly the opposite of what it was meant to do; #457 restored the sourcemaps of the minified files of pdf.js - 5.0.0-beta.3 updated the "bleeding edge" branch to pdf.js 2.7.52 - 5.0.0 #483 fixed a bug that prevented to save PDF forms with the data entered by the user - 5.0.1 #488 fixed the URL of the CMap files - 5.1.0 #495 implemented `[(scrollMode)]`; implemented `pageViewMode="single"`; updated the bleeding-edge branch - 5.2.0-alpha.0 #499 and #511 implemented a proof of concept for `[(formData)]` (which is going to be renamed `[(formData)])` after deciding what the final API looks like) - 5.2.0 #499 and #511 implemented `[(formData)]` - 5.2.1 #499 and #511 bugfix for `[(formData)]` (two-way binding was broken) - 5.3.0 #358 added a polyfill to the service worker (several not-so-old browsers don't implement Promise.allSettled()) - 5.4.0-beta.0 #523 moved every CSS of the zoom dropdown to the zoom dropdown component, tidying up the contractictory CSS rules - 5.4.0-beta.1 #523 fixed the broken layout of the rotate buttons in the Edge browser - 6.0.0-beta.0 #523 use the standard dropdown box for zooming; changed the cursor appearance on buttons; fine-tuned the CSS of the "unverified signature" message - 6.0.0-beta.1 #535 added the attribute `showToolbar`; fixed the detection whether the primary tool should be hidden or not - 6.0.0-beta.2 #548 look for the locale folder in the assets path defined by `pdfDefaultOptions.assetsFolder`; added the attribute `localeFolderPath` to allow users to put their locale folder into an alternative path; removed debug log messages; admit that the library is compatible to Angular 11; reset the default value of "showUnverifiedSignatures" to false - 6.0.0-beta.3 removed the deprecated attribute `[mobileZoom]` (use `[mobileFriendlyZoom]` instead); #535 `showToolbar` wasn't always respected; #534 solved the Chrome Content Security Policy (CSP) failure that happened when using BLOBs and running on a server implementing the Content Security Policy strictly - 6.0.0-beta.4 #534 made the solution more resilient - 6.0.0-beta.5 #534 finished implementing the feature - 6.0.0-beta.6 #533 #450 implemented the `PdfDocumentPropertiesExtractor` - 6.0.0 identical to 6.0.0-beta.6 - but let's call it a version! - 6.1.0 #551 stop printing infos and warnings on `logLevel="0"`; #552 repaired the minified files of the "bleeding edge" branch - 6.2.0-alpha.0 #492 support infinite scrolling (i.e. using the browser scrollbar instead of implementing our own scrollbar) - 6.2.0-alpha.1 #557 improved compatibility to IE11; #492 support infinite scrolling (i.e. using the browser scrollbar) - 7.0.0-beta.0 #558 added `getCurrentDocumentAsBlob()` and `getFormData()` to `NgxExtendedPdfViewerService`; #556 and #543 emit `(zoom)` even if it's one of the text options, and stop resetting the zoom when loading a new PDF file; close the PDF viewer if `[src]` is set to `undefined`; removed deprecated attributes and methods - 7.0.0-beta.1 #553 added the version number to the JavaScript file (thus avoiding cache problems after updating ngx-extended-pdf-viewer) - 7.0.0-beta.2 #558 added the form data to the BLOB exported by `getCurrentDocumentAsBlob()` - 7.0.0-beta.3 #562 don't jump to another page after changing the zoom in single-page mode - 7.0.0-beta.4 #530 reduce the print resolution if it exceeds the limits of the browser; emit a warning when using an over-the-top `[zoom]` or `[printResolution]` - 7.0.0-beta.5 #542 prevent IE11 and Edge from scrolling to the end of the page - 7.0.0-beta.6 #567 support Acroform radio buttons and multine fields; improved support for Acroform checkboxes; #542 repair forward page navigation when `pageMode!="single"` - 7.0.0 #573 don't jump to the top of the page when zooming; #579 don't hide the sidebar toolbar if the table of contents should visible; #492 and #495 make sure the current page is rendered as early as possible - 7.1.0 #715 fixed a memory leak that sometime preventing printing more than once; #583 pinch gestures now respect `[minZoom]` and `[maxZoom]` on mobile devices - 7.1.1 #586 now the bleeding-edge branch prints again; #589 remove the scrollbar when `[pageViewMode]="'single'"` and `[zoom]="'page-fit'"`; #589 resize the viewer area when the zoom is change when `[pageViewMode]="'infinite-scroll'"` - 7.1.2 #589 get rid of the scrollbar when `[pageViewMode]="'single'"` and `[zoom]="'page-fit'"` and `[showBorders]="'false'"` - 7.2.0 #588 added `(progress)`; #589 prevent unexpected scrolling in single-page mode when the zoom is changed - 7.2.1 `[scrollMode]` now also works when you set it from horizontal or wrapped to vertical - 7.3.0 #598 translate the message "This PDF contains a digital signature"; #603 added Dutch translations for the texts added by ngx-extended-pdf-viewer - 7.3.1 #598 Dutch and Slovenian translations; #265 consider the scroll position of the window when using touch events to zoom; #599 fix min/max zoom on mobile devices - 7.3.2 #615 improved several CSS rules. Kudos to Roman Sattler for sending the pull request! - 8.0.0-beta.0 #609 enable server-side rendering; #591 fixed the bug that zoom using wheel and ctrl goes to endless loop - 8.0.0-beta.1 #591 send `(zoomChange)` without causing an `ExpressionChangedAfterItHasBeenCheckedErrror` - 8.0.0-beta.2 #620 copied the missing translation key from pdf.js 2.7 ("bleeding edge") to the default version pdf.js 2.6; copied English translations of the missing translations of any language to get rid of the warnings; merged the latest changes of pdf.js. 2.7 - 8.0.0-beta.3 #627 updated the bleeding edge to the latest (and final) version 2.7 and load the correct version of the 2.6 files - 8.0.0-beta.4 updated to the newest version of pdf.js (default branch now is pdf.js 2.7, bleeding-edge now is pdf.js 2.8) - 8.0.0-beta.5 #623 don't show the "unverified signature" warning if the signature is not displayed - 8.0.0-beta.6 #633 hide the loading bar not only for the first instance of ngx-extended-pdf-viewer, but also for every instance shown later (version 2.7 only) - 8.0.0-beta.7 #639 now unverified digital signatures can be displayed without having to deactivate form support. Use the feature at your own risk - currently there's no way to detect forget signatures! #632 allow for multi-line custom toolbars - 8.0.0-beta.8 #632 allow for multi-line custom toolbars; minor CSS improvements; updated the "bleeding edge" branch - 8.0.0-beta.9 #633 hide the "preparing document for print" dialog after opening the print preview window; added the new, improved highlighting of find results to fuzzy search - 8.0.0 #644 more precise highlighting when searching long words fuzzily - 8.1.0 #426 fix full-screen mode on Safari and iPad. Note this is a fairly radical solution which might cause problems with Angular. - 8.1.1 #649 fixed the Italian translations (and probably many other translations, too) - 8.1.2 #650 + #657 restored compatibility to MacOS Mojave and iOS 13; #649 fixed the Italian translations (and probably many other translations, too) - 8.2.0 #650 compatibility to Safari 12.1 and 11.1; fixed the automatic height calculation if the height attribute is omitted or given as a percentage and the CSS framework translates that to "0px" - 8.3.0-alpha.0 #652 support the double-tap gesture to enlarge the PDF; #675 use the correct color to display errors; #690 fix an error that sometimes happens when the preview window is closed - 8.3.0 #704 now you can pass URL objects to the `[url]`; #694 by default, `pdfDefaultOptions.textLayerMode` is now the enhanced text layer; plus, the PDF uses `pdfDefaultOptions.textLayerMode` the chosen the text layer mode - 8.4.0 #686 optionally prevent dragging and dropping files to the PDF viewer - 9.0.0-alpha.0 #700 re-worked the print CSS - 9.0.0-alpha.1 #90 #543 if `[zoom]` is undefined or omitted, the zoom, page number, and rotation are taken from `localStore`. In other words: if you've viewed the document before, your settings are restored. #255 stop reporting the "worker is terminated" message. #707 fixed the exception occurring in Brave on iOS with active fingerprinting protection; #645 added the `(pageRender)` event which is sent when a page is about to be rendered (as opposed to `(pageRendered)`, which is sent when the page has finished rendering); #629 download Blobs and base64 files on Chrome on iOS; #90 respect the rotation the user choose previously when re-opening a PDF document; #652 added `pdfDefaultOptions.doubleTapZoomFactor` to enable custom scalings on double-tap - 9.0.0-alpha.2 #681 make sure there's always an `outlineOptionsContainer` even if the custom sidebar doesn't need it - 9.0.0-alpha.3 #712 #714 fixed two annoying bug that sometimes caused crashes when using pinch gestures on mobile devices; updated the bleeding edge to the final version 2.8 of pdf.js; #645 make the cleanup() method more resilient - if you can't clean up the page proxy, clean it up after finishing the render task; don't report errors if the PDF viewer is destroyed while it's still rendering the sidebar; #707 show the progress bar when loading - 9.0.0-alpha.4 #732 allow `[base64Src]` to be undefined (so it can be filled asynchronously with the result of a REST call) - 9.0.0-alpha.5 #740 support for CSP - 9.0.0-alpha.6 #748 delay the initialization of the PDF viewer if the PDF file is loaded lazily - 9.0.0-alpha.7 bugfixes required by the strict type checks of Angular 12; #748 fixed a bug introduced with version 9.0.0-alpha.1. That version ignored that the user settings are initialized after loading the PDF file, so sometimes zoom setting was ignore, resulting in a blank page until the screen was resized. - 9.0.0-alpha.8 #718 repaired `[(formData)]` for input fields, text areas, and checkboxes. Radio boxes and `<select>` fields are still broken. - 9.0.0-alpha.9 #718 repaired `[(formData)]` for `<select>` fields (both dropdowns and multiple-choice fields) and radio buttons. However, multiple choice fields aren't printed. - 9.0.0-rc.0 #719 bumped up the default branch to pdf.js 2.8 - 9.0.0-rc.1 #719 bumped up the "bleeding edge" branch to pdf.js 2.9 - 9.0.0-rc.2 #776 added new CSS rules from pdf.js 2.9; increased the z-indexes (that may be a breaking change!); #771 `(formDataChange)` sends pre-filled form values to the Angular model again - 9.0.0-rc.3 #719 bumped up the default branch to pdf.js 2.9 and the bleeding-edge branch to pdf.js 2.10 - 9.0.0 #783 improved compatibility to Bootstrap 3; #787 show the toolbar if the only visible menu items are the spread modes (i.e. `[spreadButton]="true"`). - 9.0.1 fixed a typo of the README.md; dependency updates - 9.0.2 #797 fixed a CSS bug that positioned the highlights search results at virtually random positions - 9.0.3 #814 clear the form data cache when opening a second document; #802 stop opening the "download" dialog after closing a form; added an `await` to the calls of the `close()` method; call `close()` explicitely before opening a new PDF file (this might reduce error messages in the console) - 9.0.4 #814 added a null-check before clearing the form data cache - 9.0.5 #818 added another null-check to prevent errors when `[src]` changes - 10.0.0-alpha.0 #823 improved the algorithm checking the height. _Warning_: this version is broken! - 10.0.0-alpha.1 downgraded ng-packagr because it forgets to ship the CSS files - 10.0.0-alpha.2 #847 bumped up the default branch to pdf.js 2.10 and the bleeding-edge branch to pdf.js 2.11 - 10.0.0-alpha.3 #850 add the page number to the return value of `NgxExtendedPdfViewerService.getFormData()` - 10.0.0-alpha.4 #864 accept ftp:// and capacitor:// urls (bleeding edge branch only) - 10.0.0-alpha.5 #864 accept capacitor:// urls but ceased to accept ftp:// because the fetch API doesn't support ftp (both 2.10 and bleeding edge branch); #868 [formData] now updates when fields are updated by the scripting engine; #843 add an option to disable the scripting engine - 10.0.0-alpha.6 #859 combine pageViewMode: single and spread: even - 10.0.0-alpha.7 #859 don't jump to another page when switching to another spread mode; align the pages correctly when [showBorders]="false"; #874 deactivate scrollMode and spreadMode depending on the pageViewMode; #803 stop setting the height of the PDF viewer to 100px after leaving the infinite scroll demo - 10.0.0-alpha.8 #877 the pages should be aligned to the center in single-page mode; #716 implementing the book mode (early prototype) - 10.0.0-alpha.9 #889 fixed two-way binding for text areas in PDF forms - 10.0.0-alpha.10 #879 improved presentation mode; #881 In single-page mode, the first and the last page are now centered, even if they are displayed as a single page despite `[spread]="'even'" (or 'odd'), and even after zooming; #890 display multiple search results correctly - 10.0.0-alpha.11 #813 potentially breaking change: relative paths of `[src]` now are relative the the base href; former versions were relative to the current URL, which led to confusing bugs; #911 better support for Windows touch screens - 10.0.0-beta.1 #930 always center the first and last page in single-page-mode - 10.0.0-beta.2 #929/#813 use the base href also for files loaded by modifying `[src]` (previously, only the first file was displayed properly); #907 remove the `?file=` query path option because it doesn't play well with `[src]` - 10.0.0 #923 stop removing the # from the URL; #929 / #813 fixed drag'n'drop; #914 enable pinch gestures on mobile devices - 10.0.1 #716 / #947 render the pages in book mode more reliably; #916 added `[pdfBackgroundColor]` to render the PDF file with a custom paper color (work in progress) - 10.0.2 Warning: form support is broken in the bleeding-edge branch! Also see #995. It's going to be fixed ASAP. Bugfixes: #940 stop prepending the base URL to the hash when using hash-based routing - 10.1.0 #995 fixed form support of the bleeding-edge branch; updated CSS; extracted several CSS files to make uptdating pdf.js easier; prepared the update to pdf.js 2.11; #958 support for checkboxes that behaves like radiobuttons - 10.5.0-alpha.0 Warning: this alpha version contains performance improvements that might break your application! #950 introduced PDFDefaultOptions.defaultCacheSize and set the default to 50 (instead of the original 10); also added an API allowing users to implement a custom pre-rendering strategy; #972 allow users to catch the `fileinputchange` event and - if it's a drag-and-drop event - learn the drop coordinates; #975 implemented performance improvements - 10.5.0 published the final version after testing the performance tuning thoroghly; #950 documented and fine-tuned the pre-rendering strategy; #979 added the missing type definition of pdfDefaultOptions.ignoreDestinationZoom; #994 stop throwing exceptions when opening a file via drag-and-drop - 11.0.0-alpha.0 #995 performance improvements; #991/#1000 better detection of browsers lacking support for optional chaining; updated to pdf.js 2.11 (default) and pdf.js 2.12 (bleeding-edge branch); added the new "page scroll" mode of pdf.js 2.12 (which is essentially identical to `[pageViewMode]="'single'", but implemented independently by the pdf.js team) (only supported by the "bleeding edge" branch) - 11.0.0-alpha.1 now the default version of pdf.js is really 2.11.531 (the alpha.0 version accidentally delivered version 2.12.350) - 11.0.0-alpha.2 #998 add an additional log message to hunt down the Cypress bug - 11.0.0-alpha.3 #1013 lower the reqirements to RxJS 6; #1015 #995 removed the custom single-page-mode in favor of the new `[scrollMode]="3"` of pdf.js 2.12 - 11.0.0-alpha.4 #804 allow users to filter log messages - 11.0.0-alpha.5 #1030 ignore tiny rounding difference when emitting `(zoomChange)`; #1035 fix the "Window is not defined" error message - 11.0.0-alpha.6 #1040 fixed the single-page mode of the bleeding-edge branch; #804 detect the worker thread more reliably - 11.0.0-alpha.7 #745 include the PDF content to the tab order, enabling users to scroll with the keyboard; #832 added an option to search the current page only - 11.0.0-alpha.8 #1033 drop support of pre-Ivy Angular - 11.0.0-alpha.9 #1033 drop support for Angular 8; #802 stop opening the "save" dialog after changing the `[src]` attribute - 11.0.0-alpha.10 #1058 use the correct import of the RxJS take operator - 11.0.0-alpha.11 #1063 detect if your browser support the logical assignment operators, and fall back to the ES5 version if it doesn't - 11.0.0-alpha.12 #1059 fix the "Window is not defined" bug; added missing translations for a few languages; update the build chain to Angular 13; stop versioning the generated files on GitHub (with the exception of the non-minified ESNext files) - 11.0.0-alpha.13 #832 added an option to enter a page range to the findbar; hide the new findbar options in the default branch (i.e. pdf.js 2.11); add the "find in page range" feature to `NgxExtendedPdfViewerService.find()`; #1064 fires `(pdfLoaded)` after loading the document and fire `(pdfLoadingStarts)` before loading the document (the old timing was wrong) - 11.0.0-beta.1 #1055 improve performance by generating the thumbnails lazily; update to pdf.js 2.12 and 2.13 - 11.0.0-beta.2 fixed an ExpressionChangedAfterItHasBeenCheckedError when the zoom setting changes - 11.0.0-beta.3 update the description on npm - 11.0.0-beta.4 update the description on npm - 11.0.0 #1055 copied the performance improvement to pdf.js 2.12; removed several checks that have become superfluous after updating to pdf.js 2.12/2.13 - 11.0.1 #1104 repaired support for CMaps (e.g. far-eastern fonts); #1054 stop displaying the download dialog if the user didn't edit the form; added `NgxExtendedPdfViewerService.recalculateSize()` to re-calculate the PDF viewer height programmatically - 11.0.2 #716 fixed the book mode (now the front page is display correctly when turned); improved the performance of the book mode - 11.0.3 #763 allow developers to use custom password dialogs; #1012 implement a programmatic API to access the layers of the PDF file - 11.1.0 #956 if you're using a custom free floating toolbar, `[showFreeFloatingBar]` allows you to hide it; #1007 `[wheelAction]="'zoom'"` allows you to zoom with the mouse wheel without keeping the `CTRL` key pressed; #768 resize the toolbar of the sidebar when `[mobileFriendlyZoom]` is used - 11.1.1 #962 iOS bugfix: form input now remains visible after zooming; #1118 detect if the browser supports private class attributes; #916 allow developers to draw the PDF file on a custom "paper" (i.e. a custom background - which can be a simple color or a complex algorithms drawing a background image) (work in progress) - 11.1.2 #998 support for Cypress tests - 11.2.0-alpha.0 #1065 implement `ng add ngx-extended-pdf-viewer` - 11.2.0-alpha.1 #1065 implement `ng add ngx-extended-pdf-viewer` - 11.2.0-alpha.2 #1065 first fully functional implementation of the schematic `ng add ngx-extended-pdf-viewer` - 11.2.0-alpha.3 #1163 modify the semantics of `pdfDefaultOptions.disableHistory`: now you can use this flag to prevent storing default user settings of PDF files - 11.2.0-alpha.4 #1166 make sure that the legacy ES5 builds are compatible with a wide range of browsers (but not IE11); added the attribute `[forceUsingLegacyES5]` as a last resort to solve browser compatibility issues; reduced the memory footprint of the minified `viewer*.min.js` files - 11.2.0 #1182 stop printing the empty console message - 12.0.0-alpha.0 #1183 support checkboxes that are radiobuttons in disguise correctly - 12.0.0-alpha.1 #1201 remove the margin in single-page mode (this CSS rule got lost in version 11.0.0-alpha.3); #1204 stop scrolling away from the target position of internal links - 12.0.0-alpha.2 #1197 Allow programmers to clear the PDF programmatically even if the user has opened it - 12.0.0-alpha.3 update to pdf.js 2.13.216; #1142 compatibility to iOS 14 - 12.0.0 updated the bleeding-edge branch - 12.0.1 #1257 fixed the `[namedDest]` attribute - 12.0.2 #1242 fixed Acroform date fields with custom formats - 12.0.3 #1243 tentative solution to trigger custom validation when leaving a field using the mouse - 12.1.0 #1120 narrowed the scope of a CSS rule to make customizing easier; #1143 allow developers to set `[minHeight]` - 12.1.1 #1120 #1278 corrected a layout glitch cause by narrowing the CSS rules - 13.0.0-alpha.0 #1120 narrowed the scope of a CSS rule; modified the HTML templates and the CSS code to reflect internal changes of pdf.js - 13.0.0-alpha.1 #1254 now AcroForm ChoiceWidgets are printed correctly - 13.0.0-alpha.2 #1268 Use the 'toolbar' from the pdf-toolbar component instead of using the first 'toolbar' in document. This way, developers can use the CSS class `toolbar` outside the PDF viewer. - 13.0.0-alpha.3 #1120 #1278 corrected a layout glitch cause by narrowing the CSS rules (cherry-picked from version 12.1.1) - 13.0.0-alpha.4 #1293 #1282 added the \*.min.js files again that were missing in 13.0.0-alpha.3 - 13.0.0-alpha.5 #1292 Include the 14 standard font files - 13.0.0-alpha.6 #1279 fixed the vertical layout of the primary toolbar; #1296 fixed the initialization of the PDF viewer; #1131 limit the scope of the CSS rules dedicated to printing PDF files to pdf.js - 13.0.0-alpha.7 #1267 stop showing the print preview below the application when printing; #1121 stop the secondary toolbar from spilling over; #1203 reset `window.adjacentPagesLoader` after loading a new document (because the old implementation populates the pages of the previous document when turning a page) - 13.0.0-alpha.8 #1303 repaired printing (which broke a couple of days ago) - 13.0.0-alpha.9 #1302 now the mousewheel only zooms if the mouse is above the PDF document; the same with trackpad pinch gestures, but pinch gestures on mobile devices probably don't benefit from this improvement yet - 13.0.0-alpha.10 #1313 tolerate browsers blocking the localStorage gracefully; #1300 make sure the optionalChaining check also works if run twice - 13.0.0-alpha.11 #1197 allow users to open the same PDF again after clearing it by setting `src=""`;