pdff-viewer
Version:
<h1 align="center">Simple PDF Viewer</h1>
3 lines (2 loc) • 24.8 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("pdff-viewer",["exports","@angular/core","@angular/common/http"],e):e(t["pdff-viewer"]={},t.ng.core,t.ng.common.http)}(this,function(t,n,e){"use strict";var o={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};o[o.FOUND]="FOUND",o[o.NOT_FOUND]="NOT_FOUND",o[o.WRAPPED]="WRAPPED",o[o.PENDING]="PENDING";var i=function c(t,e){this.key=t,this.value=e},r=function g(t,e,n){this.title=t,this.dest=e,this.items=n},a=function u(t,e){this.loaded=t,this.total=e},s=function l(t,e,n){void 0===t&&(t=!1),void 0===e&&(e=!0),void 0===n&&(n=!0),this.caseSensitive=t,this.highlightAll=e,this.phraseSearch=n};s.DEFAULT_OPTIONS=new s;var h=function(){function r(t,e,n,o,i){void 0===t&&(t=1),void 0===e&&(e=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),this.page=t,this.zoom=e,this.rotation=n,this.x=o,this.y=i}return r.prototype.toDestination=function(){return{pageNumber:this.page,destArray:[null,{name:"XYZ"},this.x,this.y,this.zoom]}},r.prototype.toQueryString=function(){return r.PARAMETER_SEPARATOR+(r.PARAMETER_PAGE+"=")+this.page+r.PARAMETER_SEPARATOR+r.PARAMETER_ZOOM+"="+this.zoom+r.PARAMETER_SEPARATOR+r.PARAMETER_ROTATION+"="+this.rotation+r.PARAMETER_SEPARATOR+r.PARAMETER_X+"="+this.x+r.PARAMETER_SEPARATOR+r.PARAMETER_Y+"="+this.y},r.buildSimplePDFBookmark=function(t){if(t&&"string"==typeof t&&0<t.trim().length){var e=t.split(r.PARAMETER_SEPARATOR);if(0<e.length){var i=new r;return e.forEach(function(t){var e=t.split("="),n=e[0];if(2===e.length&&i.hasOwnProperty(n)){var o=0;o=n===r.PARAMETER_ZOOM?parseFloat(""+e[1]):parseInt(""+e[1],10),o=Number.isNaN(o)?0:o,i[n]=o}}),i}}return r.EMPTY_BOOKMARK},r}();h.EMPTY_BOOKMARK=new h(1,.75,0,0,0),h.PARAMETER_SEPARATOR="#",h.PARAMETER_PAGE="page",h.PARAMETER_ZOOM="zoom",h.PARAMETER_ROTATION="rotation",h.PARAMETER_X="x",h.PARAMETER_Y="y";var p={FULL:0,WIDTH:1,HEIGHT:2};p[p.FULL]="FULL",p[p.WIDTH]="WIDTH",p[p.HEIGHT]="HEIGHT","undefined"!=typeof window&&(window["pdfjs-dist/build/pdf"]=require("pdfjs-dist/build/pdf"),require("pdfjs-dist/web/compatibility"),require("pdfjs-dist/web/pdf_viewer"),PDFJS.verbosity=PDFJS.VERBOSITY_LEVELS.errors);var A=function(){function A(t,e){this.element=t,this.http=e,this.removePageBorders=!1,this.disableTextLayer=!1,this.onLoadComplete=new n.EventEmitter,this.onError=new n.EventEmitter,this.onProgress=new n.EventEmitter,this.onSearchStateChange=new n.EventEmitter,this.startAt=h.EMPTY_BOOKMARK,this.loaded=!1,this.currentPage=1,this.numberOfPages=1,this.outline=[],this.zoom=1,this.rotation=0,this.searching=!1,this.lastSearchText="",this.searchPrevious=!1,this.searchOptions=s.DEFAULT_OPTIONS}return A.prototype.ngOnInit=function(){if("undefined"!=typeof window){if("string"!=typeof PDFJS.workerSrc){var t="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/"+PDFJS.version+"/pdf.worker.min.js";PDFJS.workerSrc=t}this.initPDFJS(),this.openDocument(this.src)}},A.prototype.ngOnDestroy=function(){this.pdf&&this.pdf.destroy()},A.prototype.openDocument=function(t,e){void 0===e&&(e=h.EMPTY_BOOKMARK),this.resetParameters(),this.startAt=e,this.setAndParseSrc(t),this.loadFile()},A.prototype.openFile=function(t,e){var n=this;void 0===e&&(e=h.EMPTY_BOOKMARK);try{var o=new FileReader;o.onload=function(){n.openDocument(new Uint8Array(o.result),e)},o.onerror=function(t){n.onError.emit(t),n.loaded=!1},o.readAsArrayBuffer(t)}catch(i){this.onError.emit(i),this.loaded=!1}},A.prototype.openUrl=function(t,e){var n=this;void 0===e&&(e=h.EMPTY_BOOKMARK),this.http.get(t,{responseType:"arraybuffer"}).subscribe(function(t){n.openDocument(new Uint8Array(t),e)},function(t){n.onError.emit(t),n.loaded=!1})},A.prototype.isDocumentLoaded=function(){return this.loaded},A.prototype.initPDFJS=function(){var t=this.getContainer();PDFJS.disableTextLayer=this.disableTextLayer,this.pdfLinkService=new PDFJS.PDFLinkService,this.pdfViewer=new PDFJS.PDFSinglePageViewer({container:t,removePageBorders:this.removePageBorders,linkService:this.pdfLinkService}),this.pdfLinkService.setViewer(this.pdfViewer),this.pdfFindController=new PDFJS.PDFFindController({pdfViewer:this.pdfViewer}),this.pdfViewer.setFindController(this.pdfFindController),t.addEventListener("pagesinit",this.pagesinitEventListener.bind(this)),t.addEventListener("pagechange",this.pagechangeEventListener.bind(this)),t.addEventListener("updateviewarea",this.updateviewareaEventListener.bind(this))},A.prototype.pagesinitEventListener=function(){this.pdfViewer.currentScaleValue=A.PDF_VIEWER_DEFAULT_SCALE,this.navigateToBookmark(this.startAt),this.onLoadComplete.emit()},A.prototype.pagechangeEventListener=function(){this.currentPage=this.pdfViewer._currentPageNumber},A.prototype.updateviewareaEventListener=function(){this.zoom=this.pdfViewer._currentScale},A.prototype.setAndParseSrc=function(t){if(this.src=t,this.src&&"string"==typeof this.src){var e=this.src.split(h.PARAMETER_SEPARATOR);1<e.length&&(this.startAt=h.buildSimplePDFBookmark(this.src),this.src=e[0])}},A.prototype.loadFile=function(){var n=this;if(this.loaded=!1,this.src){this.pdf&&this.pdf.destroy();var t=void 0;(t="string"==typeof this.src?PDFJS.getDocument({url:this.src,withCredentials:!0}):PDFJS.getDocument(this.src)).onProgress=function(t){n.onProgress.emit(new a(t.loaded,t.total))},t.promise.then(function(t){n.pdfViewer.setDocument(t),n.pdfViewer.currentScaleValue=A.PDF_VIEWER_DEFAULT_SCALE,n.pdfLinkService.setDocument(t,null),n.pdf=t,n.pdf.getOutline().then(function(t){n.outline=n.mapOutline(t)}),n.pdf.getMetadata().then(function(e){Object.getOwnPropertyNames(e.info).forEach(function(t){n.information.push(new i(t,e.info[t]))})}),n.numberOfPages=n.pdf.numPages,n.loaded=!0},function(t){n.resetParameters(),n.onError.emit(t)})}},A.prototype.resetParameters=function(){this.information=[],this.outline=null,this.currentPage=1,this.zoom=1,this.numberOfPages=1,this.startAt=h.EMPTY_BOOKMARK,this.pdfFindController&&this.pdfFindController.reset()},A.prototype.mapOutline=function(t){var e=this;return t?t.map(function(t){return new r(t.title,t.dest,e.mapOutline(t.items))},this):[]},A.prototype.getContainer=function(){return this.element.nativeElement.querySelector("div")},A.prototype.getDocumentInformation=function(){return this.loaded&&this.information?this.information:[]},A.prototype.getZoom=function(){return this.zoom},A.prototype.getZoomPercent=function(){return Math.floor(1e3*this.getZoom())/10},A.prototype.zoomIn=function(){this.isDocumentLoaded()&&this.setZoom(this.zoom+A.ZOOM_UNIT)},A.prototype.zoomOut=function(){this.isDocumentLoaded()&&this.setZoom(this.zoom-A.ZOOM_UNIT)},A.prototype.zoomReset=function(){this.isDocumentLoaded()&&this.setZoom(1)},A.prototype.zoomFullPage=function(){var n=this;this.isDocumentLoaded()&&this.pdf.getPage(this.currentPage).then(function(t){var e=n.getScale(t,p.FULL);n.setZoom(e)})},A.prototype.zoomPageWidth=function(){var n=this;this.isDocumentLoaded()&&this.pdf.getPage(this.currentPage).then(function(t){var e=n.getScale(t,p.WIDTH);n.setZoom(e)})},A.prototype.zoomPageHeight=function(){var n=this;this.isDocumentLoaded()&&this.pdf.getPage(this.currentPage).then(function(t){var e=n.getScale(t,p.HEIGHT);n.setZoom(e)})},A.prototype.getScale=function(t,e){void 0===e&&(e=p.FULL);var n=t.getViewport(1,this.rotation),o=this.getContainer().offsetHeight,i=this.getContainer().offsetWidth;if(0===o||0===i)return 1;var r=(o-A.PAGE_RESIZE_BORDER_HEIGHT)/n.height,a=(i-A.PAGE_RESIZE_BORDER_WIDTH)/n.width,s=r<a?r:a;e!==p.FULL&&(s=e===p.WIDTH?a:r);return Math.floor(1*s/A.CSS_UNITS*100)/100},A.prototype.setZoom=function(t){if(this.isDocumentLoaded()&&"number"==typeof t){var e=this.normalizeScale(t);this.pdfViewer._setScale(e,!1),this.zoom=e}},A.prototype.setZoomInPercent=function(t){this.isDocumentLoaded()&&"number"==typeof t&&this.setZoom(t/100)},A.prototype.normalizeScale=function(t){var e=Math.round(1e3*t)/1e3;return A.MAX_ZOOM<t?e=A.MAX_ZOOM:t<A.MIN_ZOOM&&(e=A.MIN_ZOOM),e},A.prototype.search=function(t,e){if(void 0===e&&(e=s.DEFAULT_OPTIONS),this.isDocumentLoaded()){var n=t?t.trim():"";this.lastSearchText=t,this.searchPrevious=!1,this.searchOptions=e,this.pdfFindController.onUpdateResultsCount=this.onUpdateResultsCount.bind(this),this.pdfFindController.onUpdateState=this.onUpdateState.bind(this),this.pdfFindController.executeCommand(A.PDF_FINDER_FIND_COMMAND,{caseSensitive:this.searchOptions.caseSensitive,findPrevious:!1,highlightAll:this.searchOptions.highlightAll,phraseSearch:this.searchOptions.phraseSearch,query:n})}},A.prototype.nextMatch=function(){this.stepMatch(!1)},A.prototype.previousMatch=function(){this.stepMatch(!0)},A.prototype.stepMatch=function(t){this.isDocumentLoaded()&&1<this.getNumberOfMatches()&&(this.searchPrevious!==t?(this.searchPrevious=t,this.searchAgain()):(this.pdfFindController.nextMatch(),this.currentPage=this.pdfViewer._currentPageNumber))},A.prototype.searchAgain=function(){this.isDocumentLoaded()&&this.pdfFindController.executeCommand(A.PDF_FINDER_AGAIN_COMMAND,{caseSensitive:this.searchOptions.caseSensitive,findPrevious:this.searchPrevious,highlightAll:this.searchOptions.highlightAll,phraseSearch:this.searchOptions.phraseSearch,query:this.lastSearchText})},A.prototype.getNumberOfMatches=function(){return this.isDocumentLoaded()?this.pdfFindController.matchCount:0},A.prototype.hasMatches=function(){return 0<this.getNumberOfMatches()},A.prototype.isSearching=function(){return this.searching},A.prototype.onUpdateResultsCount=function(){this.pdfFindController.onUpdateResultsCount=null,this.currentPage=this.pdfViewer._currentPageNumber},A.prototype.onUpdateState=function(t){this.onSearchStateChange.emit(t),this.searching=t===o.PENDING,this.searching||(this.pdfFindController.onUpdateState=null)},A.prototype.getCurrentPage=function(){return this.currentPage},A.prototype.getNumberOfPages=function(){return this.numberOfPages},A.prototype.getOutline=function(){return this.hasOutline()?this.outline:[]},A.prototype.hasOutline=function(){return this.loaded&&!!this.outline&&!!this.outline.length},A.prototype.navigateToChapter=function(t){this.isDocumentLoaded()&&this.pdfLinkService.navigateTo(t)},A.prototype.firstPage=function(){this.isDocumentLoaded()&&(this.currentPage=1,this.navigateToPage(this.currentPage))},A.prototype.lastPage=function(){this.isDocumentLoaded()&&(this.currentPage=this.getNumberOfPages(),this.navigateToPage(this.currentPage))},A.prototype.nextPage=function(){this.isDocumentLoaded()&&(this.currentPage++,this.navigateToPage(this.currentPage,1))},A.prototype.prevPage=function(){this.isDocumentLoaded()&&(this.currentPage--,this.navigateToPage(this.currentPage,this.numberOfPages))},A.prototype.navigateToPage=function(t,e){if(this.isDocumentLoaded()){var n=parseInt(""+t,10);this.currentPage=n||this.currentPage,this.currentPage>this.numberOfPages&&(this.currentPage=e||this.numberOfPages),this.currentPage<=0&&(this.currentPage=e||1)}},A.prototype.resetRotation=function(){this.rotate(0)},A.prototype.turnLeft=function(){this.rotate(this.rotation-90)},A.prototype.turnRight=function(){this.rotate(this.rotation+90)},A.prototype.getRotation=function(){return this.rotation},A.prototype.rotate=function(t){void 0===t&&(t=90),this.isDocumentLoaded()&&(this.rotation=parseInt(""+t,10),270===this.rotation?this.rotation=-90:-180===this.rotation&&(this.rotation=180),this.pdfViewer.pagesRotation=this.rotation)},A.prototype.createBookmark=function(){var a=this;return this.isDocumentLoaded()?this.pdf.getPage(this.currentPage).then(function(t){var e=t.getViewport(1,a.rotation),n=a.getContainer(),o=n.scrollLeft/n.scrollWidth*e.width,i=(n.scrollHeight-n.scrollTop)/n.scrollHeight*e.height;if(90===a.rotation){var r=o;o=i=n.scrollTop/n.scrollHeight*e.height,i=r}else if(180===a.rotation)o=(n.scrollWidth-n.scrollLeft)/n.scrollWidth*e.width,i=n.scrollTop/n.scrollHeight*e.height;else if(-90===a.rotation){r=o=(n.scrollWidth-n.scrollLeft)/n.scrollWidth*e.width;o=i,i=r}return o=Math.round(o),i=Math.round(i),new h(a.currentPage,a.zoom,a.rotation,o,i)}):Promise.reject("Document is not loaded")},A.prototype.navigateToBookmark=function(t){this.isDocumentLoaded()&&t&&(this.rotate(t.rotation),this.pdfViewer.scrollPageIntoView(t.toDestination()))},A.prototype.getPageSnapshot=function(i){var r=this;return void 0===i&&(i=1),this.isDocumentLoaded()?this.pdf.getPage(this.currentPage).then(function(t){var e=t.getViewport(i,0),n=document.createElement("canvas"),o=n.getContext("2d");return n.height=e.height,n.width=e.width,t.render({canvasContext:o,viewport:e}).then(function(){return r.dataURItoFile(n.toDataURL(A.SNAPSHOT_TPYE))})}):Promise.reject("Document is not loaded")},A.prototype.dataURItoFile=function(t){var e;e=0<=t.split(",")[0].indexOf("base64")?atob(t.split(",")[1]):unescape(t.split(",")[1]);for(var n=t.split(",")[0].split(":")[1].split(";")[0],o=new Uint8Array(e.length),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);var r=new Blob([o],{type:n}),a=r;return a.lastModifiedDate=new Date,a.name="screen.png",r},A}();A.CSS_UNITS=96/72,A.PAGE_RESIZE_BORDER_HEIGHT=15,A.PAGE_RESIZE_BORDER_WIDTH=15,A.ZOOM_UNIT=.1,A.MAX_ZOOM=5,A.MIN_ZOOM=.05,A.PDF_FINDER_FIND_COMMAND="find",A.PDF_FINDER_AGAIN_COMMAND="findagain",A.PDF_VIEWER_DEFAULT_SCALE="page-fit",A.SNAPSHOT_TPYE="image/png",A.decorators=[{type:n.Component,args:[{selector:"simple-pdf-viewer",template:'<div class="pdfViewerContainer" [hidden]="!isDocumentLoaded()"><div class="pdfViewer"></div></div>',styles:["\n :host /deep/ .pdfViewerContainer {\n overflow: auto;\n position: relative;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n }\n \n :host /deep/ .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n opacity: 0.2;\n line-height: 1.0;\n }\n \n :host /deep/ .textLayer > div {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n -webkit-transform-origin: 0% 0%;\n -moz-transform-origin: 0% 0%;\n -o-transform-origin: 0% 0%;\n -ms-transform-origin: 0% 0%;\n transform-origin: 0% 0%;\n }\n \n :host /deep/ .textLayer .highlight {\n margin: -1px;\n padding: 1px;\n \n background-color: #002bff;\n border-radius: 4px;\n }\n \n :host /deep/ .textLayer .highlight.begin {\n border-radius: 4px 0px 0px 4px;\n }\n \n :host /deep/ .textLayer .highlight.end {\n border-radius: 0px 4px 4px 0px;\n }\n \n :host /deep/ .textLayer .highlight.middle {\n border-radius: 0px;\n }\n \n :host /deep/ .textLayer .highlight.selected {\n background-color: rgb(0, 100, 0);\n }\n \n :host /deep/ .textLayer ::selection { background: #002bff; }\n :host /deep/ .textLayer ::-moz-selection { background: #002bff; }\n \n :host /deep/ .textLayer .endOfContent {\n display: block;\n position: absolute;\n left: 0px;\n top: 100%;\n right: 0px;\n bottom: 0px;\n z-index: -1;\n cursor: default;\n -webkit-user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n }\n \n :host /deep/ .annotationLayer section {\n position: absolute;\n }\n \n :host /deep/ .textLayer .endOfContent.active {\n top: 0px;\n }\n \n :host /deep/ .annotationLayer .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n \n :host /deep/ .annotationLayer .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #002bff;\n box-shadow: 0px 2px 10px #002bff;\n }\n \n :host /deep/ .annotationLayer .linkAnnotation > a /* -ms-a */ {\n background: url(\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\") 0 0 repeat;\n }\n \n :host /deep/ .annotationLayer .textAnnotation img {\n position: absolute;\n cursor: pointer;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation input,\n :host /deep/ .annotationLayer .textWidgetAnnotation textarea,\n :host /deep/ .annotationLayer .choiceWidgetAnnotation select,\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.checkBox input,\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.radioButton input {\n background-color: #002bff;\n border: 1px solid transparent;\n box-sizing: border-box;\n font-size: 9px;\n height: 100%;\n padding: 0 3px;\n vertical-align: top;\n width: 100%;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation textarea {\n font: message-box;\n font-size: 9px;\n resize: none;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation input[disabled],\n :host /deep/ .annotationLayer .textWidgetAnnotation textarea[disabled],\n :host /deep/ .annotationLayer .choiceWidgetAnnotation select[disabled],\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {\n background: none;\n border: 1px solid transparent;\n cursor: not-allowed;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation input:hover,\n :host /deep/ .annotationLayer .textWidgetAnnotation textarea:hover,\n :host /deep/ .annotationLayer .choiceWidgetAnnotation select:hover,\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {\n border: 1px solid #000;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation input:focus,\n :host /deep/ .annotationLayer .textWidgetAnnotation textarea:focus,\n :host /deep/ .annotationLayer .choiceWidgetAnnotation select:focus {\n background: none;\n border: 1px solid transparent;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation input.comb {\n font-family: monospace;\n padding-left: 2px;\n padding-right: 0;\n }\n \n :host /deep/ .annotationLayer .textWidgetAnnotation input.comb:focus {\n width: 115%;\n }\n \n :host /deep/ .annotationLayer .buttonWidgetAnnotation.checkBox input,\n :host /deep/ .annotationLayer .buttonWidgetAnnotation.radioButton input {\n -webkit-appearance: none;\n -moz-appearance: none;\n -ms-appearance: none;\n appearance: none;\n }\n \n :host /deep/ .annotationLayer .popupWrapper {\n position: absolute;\n width: 20em;\n }\n \n :host /deep/ .annotationLayer .popup {\n position: absolute;\n z-index: 200;\n max-width: 20em;\n background-color: #FFFF99;\n box-shadow: 0px 2px 5px #333;\n border-radius: 2px;\n padding: 0.6em;\n margin-left: 5px;\n cursor: pointer;\n word-wrap: break-word;\n }\n \n :host /deep/ .annotationLayer .popup h1 {\n font-size: 1em;\n border-bottom: 1px solid #000000;\n padding-bottom: 0.2em;\n }\n \n :host /deep/ .annotationLayer .popup p {\n padding-top: 0.2em;\n }\n \n :host /deep/ .annotationLayer .highlightAnnotation,\n :host /deep/ .annotationLayer .underlineAnnotation,\n :host /deep/ .annotationLayer .squigglyAnnotation,\n :host /deep/ .annotationLayer .strikeoutAnnotation,\n :host /deep/ .annotationLayer .fileAttachmentAnnotation {\n cursor: pointer;\n }\n \n :host /deep/ .pdfViewer .canvasWrapper {\n overflow: hidden;\n }\n \n :host /deep/ .pdfViewer .page {\n direction: ltr;\n width: 816px;\n height: 1056px;\n margin: 1px auto -8px auto;\n position: relative;\n overflow: visible;\n border: 9px solid transparent;\n background-clip: content-box;\n border-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=') 9 9 repeat;\n background-color: white;\n }\n \n :host /deep/ .pdfViewer.removePageBorders .page {\n margin: 0px auto 10px auto;\n border: none;\n }\n \n :host /deep/ .pdfViewer.singlePageView {\n display: inline-block;\n }\n \n :host /deep/ .pdfViewer.singlePageView .page {\n margin: 0;\n border: none;\n }\n \n :host /deep/ .pdfViewer .page canvas {\n margin: 0;\n display: block;\n }\n \n :host /deep/ .pdfViewer .page .loadingIcon {\n position: absolute;\n display: block;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background: url('data:image/gif;base64,R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkG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AoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==') center no-repeat;\n } \n "]}]}],A.ctorParameters=function(){return[{type:n.ElementRef},{type:e.HttpClient}]},A.propDecorators={src:[{type:n.Input}],removePageBorders:[{type:n.Input}],disableTextLayer:[{type:n.Input}],onLoadComplete:[{type:n.Output,args:["onLoadComplete"]}],onError:[{type:n.Output,args:["onError"]}],onProgress:[{type:n.Output,args:["onProgress"]}],onSearchStateChange:[{type:n.Output,args:["onSearchStateChange"]}]};var d=function f(){};d.decorators=[{type:n.NgModule,args:[{imports:[e.HttpClientModule],declarations:[A],exports:[A]}]}],t.SimplePdfViewerModule=d,t.SimplePdfViewerComponent=A,t.SimpleSearchState=o,t.SimpleDocumentInfo=i,t.SimpleOutlineNode=r,t.SimpleProgressData=a,t.SimpleSearchOptions=s,t.SimplePDFBookmark=h,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=pdff-viewer.umd.min.js.map