Bookmarks all link to last page in document
Describe the bug All bookmarks link to the very last page
To Reproduce
- Open repl link: https://react-pdf.org/repl?code=3187b0760ce02e00408a057025803c450298c0bc300500943807cf805030c00f0022230080b61985311655400a02180e658212005e19b00220032014400aace90095c4c0046204006b463c013a689bc04c008ce3da54bd5646146c8d6135403d0dbb172cb871fa839843442465e49455d4b475f50df8b00099cc38aca8ddec6261625c527da99dbd13b8d202c4a4e41594d435b4f40dc4fc019812ad38b3eb336cd91272f3399ce8199959d80801b8c8c914307980a0b86800c400e97458004c3174f0a91151d0b19d8846c88000
- Download file
- Open file
- Open table of contents
- Click bookmark
- Notice that all bookmarks jump to the last page
Expected behavior Bookmarks should link to the page that they were placed on
Screenshots
Desktop (please complete the following information):
- OS: MacOS
- Browser: Any
- React-pdf version: v3.4.2
The issue goes away if I revert to v2.3.0. All ^v3 versions that I tried had the bug.
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.
The issue goes away if I revert to
v2.3.0. All^v3versions that I tried had the bug.
Hi @danomatic which node version you are working with.
I have the same problem. I'm using node v18.14.0
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"
}
Anyone know a version 3 release that works?
For now I'm avoiding the issue by pinning
@react-pdf/pdfkitto the last working version in yarn:"resolutions": { "@react-pdf/pdfkit": "3.1.0" }
Thank you!
Same issue here:
"@react-pdf/renderer": "4.1.5",node: v22.11.0
Still an issue with the latest release of @react-pdf/renderer, 4.1.5
If it helps others, this is the pnpm patch I'm using to work around this for now:
I'm also having this issue. When opening the PDF in Chrome and using the bookmark navigation, it only will take me to the last page