Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #478 IE #688

Merged
merged 2 commits into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion browserslist
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
IE 11
8 changes: 4 additions & 4 deletions src/app/pdf-viewer/pdf-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function isSSR() {
}

if (!isSSR()) {
PDFJS = require('pdfjs-dist/build/pdf');
PDFJSViewer = require('pdfjs-dist/web/pdf_viewer');
PDFJS = require('pdfjs-dist/es5/build/pdf');
PDFJSViewer = require('pdfjs-dist/es5/web/pdf_viewer');

PDFJS.verbosity = PDFJS.VerbosityLevel.ERRORS;
}
Expand Down Expand Up @@ -246,9 +246,9 @@ export class PdfViewerComponent
) {
pdfWorkerSrc = (window as any).pdfWorkerSrc;
} else {
pdfWorkerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${
pdfWorkerSrc = `https://cdn.jsdelivr.net/npm/pdfjs-dist@${
(PDFJS as any).version
}/pdf.worker.min.js`;
}/es5/build/pdf.worker.js`;
}

(PDFJS as any).GlobalWorkerOptions.workerSrc = pdfWorkerSrc;
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="x-ua-compatible" content="ie=11">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>ng2-pdf-viewer</title>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
Expand Down