mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[AAE-30877] - And again
This commit is contained in:
committed by
Wojciech Duda
parent
9960e20651
commit
34d55b5273
@@ -27,4 +27,3 @@ getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDyn
|
||||
|
||||
(window as any).pdfjsLib = (window as any).pdfjsLib || require('pdfjs-dist/build/pdf.min.mjs');
|
||||
(window as any).pdfjsViewer = (window as any).pdfjsViewer || require('pdfjs-dist/web/pdf_viewer.mjs');
|
||||
(window as any).pdfjsLib.GlobalWorkerOptions.workerSrc = 'base/pdfjs-dist/build/pdf.worker.min.mjs';
|
||||
|
56979
lib/core/assets/pdfjs/pdf.worker.mjs
Normal file
56979
lib/core/assets/pdfjs/pdf.worker.mjs
Normal file
File diff suppressed because one or more lines are too long
@@ -7,6 +7,11 @@
|
||||
"input": "./breadcrumbs/src/styles",
|
||||
"output": "./breadcrumbs/styles"
|
||||
},
|
||||
{
|
||||
"glob": "pdf.worker.mjs",
|
||||
"input": "./assets/pdfjs",
|
||||
"output": "assets/pdfjs"
|
||||
},
|
||||
{
|
||||
"glob": "custom-theme/**/*",
|
||||
"input": "./",
|
||||
|
@@ -213,10 +213,15 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
executePdf(pdfOptions: any) {
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdf.worker.min.mjs';
|
||||
//eslint-disable-next-line
|
||||
console.log('pdfjsLib', pdfjsLib);
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'assets/pdfjs/pdf.worker.mjs';
|
||||
//eslint-disable-next-line
|
||||
console.log('Worker', pdfjsLib.GlobalWorkerOptions.workerSrc);
|
||||
|
||||
this.loadingTask = pdfjsLib.getDocument(pdfOptions);
|
||||
|
||||
//eslint-disable-next-line
|
||||
console.log('getdocument');
|
||||
this.loadingTask.onPassword = (callback, reason) => {
|
||||
this.onPdfPassword(callback, reason);
|
||||
};
|
||||
@@ -560,6 +565,8 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
||||
* Page Rendered Event
|
||||
*/
|
||||
onPageRendered() {
|
||||
//eslint-disable-next-line
|
||||
console.log('onPageRendered');
|
||||
this.rendered.emit();
|
||||
}
|
||||
|
||||
|
@@ -27,4 +27,3 @@ getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDyn
|
||||
|
||||
(window as any).pdfjsLib = (window as any).pdfjsLib || require('pdfjs-dist/build/pdf.min.mjs');
|
||||
(window as any).pdfjsViewer = (window as any).pdfjsViewer || require('pdfjs-dist/web/pdf_viewer.mjs');
|
||||
(window as any).pdfjsLib.GlobalWorkerOptions.workerSrc = 'base/pdfjs-dist/build/pdf.worker.min.mjs';
|
||||
|
Reference in New Issue
Block a user