[AAE-30877] - And again

This commit is contained in:
VitoAlbano
2025-03-14 23:02:03 +00:00
committed by Wojciech Duda
parent 9960e20651
commit 34d55b5273
5 changed files with 56993 additions and 4 deletions

View File

@@ -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';

File diff suppressed because one or more lines are too long

View File

@@ -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": "./",

View File

@@ -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();
}

View File

@@ -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';