File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
src/renderers/pdf/components/pages Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable */
22import React , { FC , useContext , useEffect } from "react" ;
3- import { Document } from "react-pdf" ;
3+ import { Document , pdfjs } from "react-pdf" ;
44import styled from "styled-components" ;
55import { useTranslation } from "../../../../hooks/useTranslation" ;
66import { PDFContext } from "../../state" ;
@@ -29,6 +29,10 @@ const PDFPages: FC<{}> = () => {
2929 file = { currentDocument . fileData }
3030 onLoadSuccess = { ( { numPages } ) => dispatch ( setNumPages ( numPages ) ) }
3131 loading = { < span > { t ( "pdfPluginLoading" ) } </ span > }
32+ options = { {
33+ cMapUrl : `https://cdn.jsdelivr.net/npm/pdfjs-dist@${ pdfjs . version } /cmaps/` ,
34+ cMapPacked : true ,
35+ } }
3236 >
3337 { paginated ? < PDFSinglePage /> : < PDFAllPages /> }
3438 </ DocumentPDF >
You can’t perform that action at this time.
0 commit comments