File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,10 +22,7 @@ import {
2222import "react-pdf/dist/Page/AnnotationLayer.css" ;
2323import "react-pdf/dist/Page/TextLayer.css" ;
2424
25- pdfjs . GlobalWorkerOptions . workerSrc = new URL (
26- "pdfjs-dist/build/pdf.worker.min.mjs" ,
27- import . meta. url
28- ) . toString ( ) ;
25+ pdfjs . GlobalWorkerOptions . workerSrc = `https://cdn.jsdelivr.net/npm/pdfjs-dist@${ pdfjs . version } /build/pdf.worker.min.mjs` ;
2926
3027const buttonClass =
3128 "p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded text-gray-600 dark:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed" ;
@@ -37,9 +34,9 @@ const SCALE_STEP = 0.2;
3734const DEFAULT_SCALE = 1 ;
3835const RENDER_WINDOW = 2 ;
3936const PDF_OPTIONS = {
40- disableAutoFetch : false ,
41- disableRange : false ,
42- disableStream : false ,
37+ disableAutoFetch : true ,
38+ disableRange : true ,
39+ disableStream : true ,
4340} ;
4441
4542type PdfViewerBoundaryProps = {
You can’t perform that action at this time.
0 commit comments