Skip to content

Simplify the PDF Viewer on Web #1383

Closed

Description

@marcaaron

If you haven’t already, check out our contributing guidelines for onboarding!


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.

Deliverables:

Upwork: https://www.upwork.com/jobs/~01eb10da2c43ab7ead

Activity

  1. parasharrajat commented on Feb 2, 2021

    @parasharrajat
    Member

    Proposal

    1. Use the react-pdf lib and replace the Pdf.js code completely.
    2. Drop the Pdf.js vendor code from the repo.
    3. 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 ).
    4. Take input of design from the team and Update if needed to match the product theme.

    Questions

    1. Do we need to support non-Latin characters here?
  2. marcaaron commented on Feb 2, 2021

    @marcaaron
    ContributorAuthor

    Do we need to support non-Latin characters

    I think if we support them now then we should continue to support them.

  3. parasharrajat commented on Feb 15, 2021

    @parasharrajat
    Member

    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.

  4. marcaaron commented on Feb 17, 2021

    @marcaaron
    ContributorAuthor

    Proposal looks good @parasharrajat. I don't think we need to worry about 3.

  5. parasharrajat commented on Feb 18, 2021

    @parasharrajat
    Member

    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.

  6. marcaaron commented on Feb 19, 2021

    @marcaaron
    ContributorAuthor

    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?

    we have to use our own CSS rules to modify the designs

    By CSS do you mean actual .css file or can we add inline styles like we do for most other react-native/react-native-web components?

  7. laurenreidexpensify commented on Mar 9, 2021

    @laurenreidexpensify
    Contributor

    @parasharrajat I just issued payment for this one for you 👍🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions