PdfViewer component is responsible for rendering a PDF document within a React application. It utilizes the pdfjs-dist library to handle PDF rendering and provides a customizable viewer.
pdfjs-dist
Component props.
The PDF document to be displayed.
Options for configuring the PDF viewer.
The scale value for the PDF viewer.
Callback function for handling scroll events.
Child components to be rendered within the PDF viewer.
<PdfViewer pdfDocument={pdfDoc} pdfScaleValue="1.5" onScroll={handleScroll} className="custom-pdf-viewer"> <CustomComponent /></PdfViewer> Copy
<PdfViewer pdfDocument={pdfDoc} pdfScaleValue="1.5" onScroll={handleScroll} className="custom-pdf-viewer"> <CustomComponent /></PdfViewer>
PdfViewer component is responsible for rendering a PDF document within a React application. It utilizes the
pdfjs-distlibrary to handle PDF rendering and provides a customizable viewer.