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 1
1
/* eslint-disable */
2
2
import React , { FC , useContext , useEffect } from "react" ;
3
- import { Document } from "react-pdf" ;
3
+ import { Document , pdfjs } from "react-pdf" ;
4
4
import styled from "styled-components" ;
5
5
import { useTranslation } from "../../../../hooks/useTranslation" ;
6
6
import { PDFContext } from "../../state" ;
@@ -29,6 +29,10 @@ const PDFPages: FC<{}> = () => {
29
29
file = { currentDocument . fileData }
30
30
onLoadSuccess = { ( { numPages } ) => dispatch ( setNumPages ( numPages ) ) }
31
31
loading = { < span > { t ( "pdfPluginLoading" ) } </ span > }
32
+ options = { {
33
+ cMapUrl : `https://cdn.jsdelivr.net/npm/pdfjs-dist@${ pdfjs . version } /cmaps/` ,
34
+ cMapPacked : true ,
35
+ } }
32
36
>
33
37
{ paginated ? < PDFSinglePage /> : < PDFAllPages /> }
34
38
</ DocumentPDF >
You can’t perform that action at this time.
0 commit comments