You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently are using PDF.js to show PDFs inside an iframe on web and also hosting some demo code for the Mozilla PDF viewer. For this issue we will need to replace the complicated PDF viewer code with a simple bare bones viewer.
Use the react-pdf lib and replace the Pdf.js code completely.
Drop the Pdf.js vendor code from the repo.
Optimize the Pdf page rendering so that If a pdf have hundreds of page, it doesn't become a memory pit. (the possible solution is to render only a couple of pages before and after the current page and clean up as the user navigates through pages ).
Take input of design from the team and Update if needed to match the product theme.
So it seems that we have to use our own CSS rules to modify the designs as react-pdf does not provide the styling like the old pdf viewer. Any inputs here.
I am planning to put the basic styling same as the old PDF viewer into a global CSS file to modify the PDF look.
To adjust the width we can use the useWindowDimensions and then set the width of the page.
What should the breakpoints and their respective width for the pages?
a) Set the page to 100% on the mobileResponsiveWidthBreakpoint.
b) need help here.
Activity
parasharrajat commentedon Feb 2, 2021
Proposal
react-pdflib and replace the Pdf.js code completely.Questions
marcaaron commentedon Feb 2, 2021
I think if we support them now then we should continue to support them.
parasharrajat commentedon Feb 15, 2021
Is this issue on Hold? If not, Can I work on this one, I see it's been sometime it's unassigned? I already submitted a proposal above.
marcaaron commentedon Feb 17, 2021
Proposal looks good @parasharrajat. I don't think we need to worry about
3.parasharrajat commentedon Feb 18, 2021
So it seems that we have to use our own CSS rules to modify the designs as
react-pdfdoes not provide the styling like the old pdf viewer. Any inputs here.I am planning to put the basic styling same as the old PDF viewer into a global CSS file to modify the PDF look.
To adjust the width we can use the
useWindowDimensionsand then set the width of the page.What should the breakpoints and their respective width for the pages?
a) Set the page to 100% on the
mobileResponsiveWidthBreakpoint.b) need help here.
marcaaron commentedon Feb 19, 2021
I would maybe pause on adding any CSS for now and we can loop in @shawnborton to help advise on the styles.
Is there any sort of default look to it at all with styling?
By CSS do you mean actual
.cssfile or can we add inline styles like we do for most otherreact-native/react-native-webcomponents?laurenreidexpensify commentedon Mar 9, 2021
@parasharrajat I just issued payment for this one for you 👍🏽