diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.22k stars 1.11k forks source link

Bookmarks all link to last page in document #2700

Open danomatic opened 1 month ago

danomatic commented 1 month ago

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):

danomatic commented 1 month ago

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

danomatic commented 1 month ago

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.

asthaawasthi-laitkor commented 3 weeks ago

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 commented 2 weeks ago

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