From dfd22e950ec42bbf6155e14722d6ae2fb40f5f04 Mon Sep 17 00:00:00 2001 From: Tan Cher Shen Date: Fri, 17 May 2024 09:36:57 +0800 Subject: [PATCH] fix: unexpected pdf text layer rendering --- src/components/renderer/PdfRenderer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/renderer/PdfRenderer.tsx b/src/components/renderer/PdfRenderer.tsx index bf93111..3db7246 100644 --- a/src/components/renderer/PdfRenderer.tsx +++ b/src/components/renderer/PdfRenderer.tsx @@ -2,6 +2,7 @@ import React, { FunctionComponent, useState } from "react"; import { Document, Page, pdfjs } from "react-pdf"; import { repeat } from "../../utils"; import { Renderer } from "../../types"; +import "react-pdf/dist/Page/TextLayer.css"; // TODO check this https://github.com/wojtekmaj/react-pdf#browserify-and-others pdfjs.GlobalWorkerOptions.workerSrc = `//cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`;