Closed suseendran1993 closed 2 years ago
You can use React Virtuso to render a list of Pages, it will resolve slow rendering issues. Tested on iPad too. https://www.npmjs.com/package/react-virtuoso
<Document
className={classes.document}
file={{url:fileUrl}}
onLoadSuccess={onDocumentLoadSuccess}
onLoadError = {(error) => alert('Error while loading document! ')}
>
<Virtuoso
style={{ height: 500 }}
totalCount={numberOfPages}
itemContent={index => <Page
key={`page_${index + 1}`}
pageNumber={index + 1}
/>}
/>
</Document>
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.
This issue was closed because it has been stalled for 14 days with no activity.
Scenario:
We have a feature where we need to load pdf behind the fabric js canvas and need to perform some action over it, this works fine for smaller pdf let's say less than 2 MB but with larger Pdfs the application is getting crashed on mobile or ipad devices when we perform any action.
I even tried loading pdfs page by page but it still causes the applicaton to crash.
Expected behaviour:
Pdfs of larger sizes should work without crashing when we perform any action on canvas over it.
Environment