cyntler / react-doc-viewer

File viewer for React.
https://cyntler.github.io/react-doc-viewer
Apache License 2.0
392 stars 127 forks source link

pdf page content is getting displayed twice in the same page #289

Closed narinderCanGit closed 2 months ago

narinderCanGit commented 2 months ago

const docs = [ { uri : data, fileName : fileName } ];

<DocViewer pluginRenderers={DocViewerRenderers} documents={docs} config={{ header : { disableHeader : false, disableFileName : true, retainURLParams : false }, pdfVerticalScrollByDefault : true, disableExtractedTextAfterPage : true }} />

In the attached image the highlighted text is the duplicate text. If I open the data blob url in the new tab, the pdf is rendered fine with no duplicate issue.

image
smorton-planview commented 2 months ago

See https://github.com/cyntler/react-doc-viewer/issues/261.

Adding the following import should sort you out:

import '@cyntler/react-doc-viewer/dist/index.css';