Merge pull request #186 from cubercsl/patch-1

fix(pdfpreview): Support for non-latin characters
This commit is contained in:
Spencer Woo
2021-12-14 19:39:15 +08:00
committed by GitHub
+4
View File
@@ -38,6 +38,10 @@ const PDFPreview: FunctionComponent<{ file: any }> = ({ file }) => {
onLoadProgress={({ loaded, total }) => {
setLoadingText(`Loading PDF ${Math.round((loaded / total) * 100)}%`)
}}
options={{
cMapUrl: `//cdn.jsdelivr.net/npm/pdfjs-dist@${pdfjs.version}/cmaps/`,
cMapPacked: true,
}}
>
<Page
pageNumber={pageNumber}