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

Bookmarks all link to last page in document #2700

Open
danomatic opened this issue Apr 3, 2024 · 9 comments · May be fixed by #2715
Open

Bookmarks all link to last page in document #2700

danomatic opened this issue Apr 3, 2024 · 9 comments · May be fixed by #2715

Comments

@danomatic
Copy link

Describe the bug
All bookmarks link to the very last page

To Reproduce

  1. Open repl link:
    https://react-pdf.org/repl?code=3187b0760ce02e00408a057025803c450298c0bc300500943807cf805030c00f0022230080b61985311655400a02180e658212005e19b00220032014400aace90095c4c0046204006b463c013a689bc04c008ce3da54bd5646146c8d6135403d0dbb172cb871fa839843442465e49455d4b475f50df8b00099cc38aca8ddec6261625c527da99dbd13b8d202c4a4e41594d435b4f40dc4fc019812ad38b3eb336cd91272f3399ce8199959d80801b8c8c914307980a0b86800c400e97458004c3174f0a91151d0b19d8846c88000
  2. Download file
  3. Open file
  4. Open table of contents
  5. Click bookmark
  6. Notice that all bookmarks jump to the last page

Expected behavior
Bookmarks should link to the page that they were placed on

Screenshots
Screenshot 2024-04-02 at 6 04 03 PM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Any
  • React-pdf version: v3.4.2
@danomatic
Copy link
Author

The issue goes away if I revert to v2.3.0. All ^v3 versions that I tried had the bug.

@danomatic
Copy link
Author

danomatic commented Apr 3, 2024

What's so strange is this seemed to work with other v3 versions, but after about 24 hours of total dependency hell and battling with installing different versions, for the life of me I can't find one that doesn't have broken bookmarks. This is breaking a production application in a crucial way. Any help our guidance would be appreciated.

@mgmolisani mgmolisani linked a pull request Apr 12, 2024 that will close this issue
@asthaawasthi-laitkor
Copy link

The issue goes away if I revert to v2.3.0. All ^v3 versions that I tried had the bug.

Hi @danomatic which node version you are working with.

@hormiai76
Copy link

I have the same problem. I'm using node v18.14.0

@danomatic
Copy link
Author

For now I'm avoiding the issue by pinning @react-pdf/pdfkit to the last working version in yarn:

  "resolutions": {
    "@react-pdf/pdfkit": "3.1.0"
  }

@sbuys
Copy link

sbuys commented Jul 26, 2024

Anyone know a version 3 release that works?

@sbuys
Copy link

sbuys commented Jul 26, 2024

For now I'm avoiding the issue by pinning @react-pdf/pdfkit to the last working version in yarn:

  "resolutions": {
    "@react-pdf/pdfkit": "3.1.0"
  }

Thank you!

@amaury-hanser
Copy link

Same issue here:

  • "@react-pdf/renderer": "4.1.5",
  • node: v22.11.0

@stephenjudkins
Copy link

Still an issue with the latest release of @react-pdf/renderer, 4.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants