page margin

This commit is contained in:
Timur Ercan
2023-01-19 20:24:49 +01:00
parent 598025efaa
commit f7956fa3ac

View File

@ -21,22 +21,23 @@ export default function PDFViewer() {
return ( return (
<> <>
<label htmlFor="file">Load from file:</label>{" "} <div className="">
<input onChange={onFileChange} type="file" /> <Document
<Document file={"/sample.pdf"}
file={"/sample.pdf"} onLoadSuccess={onDocumentLoadSuccess}
onLoadSuccess={onDocumentLoadSuccess} options={options}
options={options} >
> {Array.from({ length: numPages }, (_, index) => (
{Array.from({ length: numPages }, (_, index) => ( <Page
<Page className="mt-5"
key={`page_${index + 1}`} key={`page_${index + 1}`}
pageNumber={index + 1} pageNumber={index + 1}
renderAnnotationLayer={false} renderAnnotationLayer={false}
renderTextLayer={false} renderTextLayer={false}
/> />
))} ))}
</Document> </Document>
</div>
</> </>
); );
} }