From dd78629d805e3a08a2615a9f22838f8b80dff531 Mon Sep 17 00:00:00 2001 From: Patrick Kratzer <38780545+pat721@users.noreply.github.com> Date: Thu, 12 Oct 2023 17:54:58 +0200 Subject: [PATCH 1/2] Add missing layer imports --- src/renderers/pdf/index.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderers/pdf/index.tsx b/src/renderers/pdf/index.tsx index 9ab7130e..32a70073 100644 --- a/src/renderers/pdf/index.tsx +++ b/src/renderers/pdf/index.tsx @@ -5,6 +5,8 @@ import { DocRenderer, IStyledProps } from "../.."; import PDFPages from "./components/pages/PDFPages"; import PDFControls from "./components/PDFControls"; import { PDFProvider } from "./state"; +import "react-pdf/dist/Page/AnnotationLayer.css"; +import "react-pdf/dist/Page/TextLayer.css"; pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`; From 46f2bb2bcdb224de9b9f538b2ff51c8dc6174bc1 Mon Sep 17 00:00:00 2001 From: Patrick Kratzer <38780545+pat721@users.noreply.github.com> Date: Thu, 12 Oct 2023 18:28:02 +0200 Subject: [PATCH 2/2] Fix path --- src/renderers/pdf/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/pdf/index.tsx b/src/renderers/pdf/index.tsx index 32a70073..0ad5bf5f 100644 --- a/src/renderers/pdf/index.tsx +++ b/src/renderers/pdf/index.tsx @@ -5,8 +5,8 @@ import { DocRenderer, IStyledProps } from "../.."; import PDFPages from "./components/pages/PDFPages"; import PDFControls from "./components/PDFControls"; import { PDFProvider } from "./state"; -import "react-pdf/dist/Page/AnnotationLayer.css"; -import "react-pdf/dist/Page/TextLayer.css"; +import "react-pdf/dist/esm/Page/AnnotationLayer.css"; +import "react-pdf/dist/esm/Page/TextLayer.css"; pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`;