Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF not working after first render #8

Open
blur94 opened this issue Oct 25, 2023 · 4 comments
Open

PDF not working after first render #8

blur94 opened this issue Oct 25, 2023 · 4 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@blur94
Copy link

blur94 commented Oct 25, 2023

On the first load, the PDF displays, but on subsequent loads of the page without refreshing the browser, the PDF won't load.

Here is the link to the component for this implementation on GitHub: https://github.com/blur94/metrix/blob/main/src/views/orders/embedPDF.tsx

Here is the link to the live demo: https://metrix-nine.vercel.app/orders

@ZipingL ZipingL self-assigned this Oct 25, 2023
@ZipingL
Copy link
Member

ZipingL commented Oct 26, 2023

Sorry about that loading issue with react routing. This was an issue that was introduced after I did some code refactoring to match the example reactjs code provided by Adobe. Unfortunately the example code while simpler to understand didn't handle edge cases regarding more complex usages of react's rendering and views.

I've fixed the issue as it's just a simple need to trigger a nested re-renderfor the adobe pdf custom react component whenever its parent component updates (for instance updates meaning after it had already mounted and is simply viewed again within react's page routing).

There shouldn't be any issues but if there is any more please let me know. I really do want to resolve issues concerning loading failures especially when using react specific features, like in this case, failure to re-render the pdf component when reloading the page view react routing.

Thanks for the excellent catch and well documented examples @blur94. It was a pretty easy to get right to the root cause! I'll close this ticket in a week just in case any issues pop up with this fix.

@ZipingL ZipingL closed this as completed Oct 26, 2023
@ZipingL ZipingL reopened this Oct 26, 2023
@ZipingL ZipingL added good first issue Good for newcomers bug Something isn't working labels Oct 26, 2023
@ZipingL ZipingL pinned this issue Oct 26, 2023
@ZipingL ZipingL added the documentation Improvements or additions to documentation label Oct 28, 2023
@our255
Copy link

our255 commented Dec 1, 2024

@ZipingL Hi Liu, still looks like this issue is open. I'm also not able to reload the pdf viewer after refreshing the screen (v 12.0.2). I appreciate you looking into this. Thanks.

@our255
Copy link

our255 commented Dec 1, 2024

@blur94 Were you able to resolve this? Thanks

@ZipingL
Copy link
Member

ZipingL commented Dec 1, 2024

@our255

This issue was resolved a while ago, my current site and my continuous deployment pipeline shows this package works fine.

  • I left this issue open as its a good example of an issue.

Do you have any console logs you can show me, you maybe facing a separate issue?

  • You can create a new issue with your specific problems and we can figure out whats going on on your end.
  • Common issues is using the correct license key, that you have to create that is specific to the domain you are using.
  • The domain I provided in the examples only work for http://localhost:80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants