Skip to content

fix: add back functionality for bookmark props#2715

Merged
diegomura merged 2 commits intodiegomura:masterfrom
mgmolisani:master
Sep 23, 2025
Merged

fix: add back functionality for bookmark props#2715
diegomura merged 2 commits intodiegomura:masterfrom
mgmolisani:master

Conversation

@mgmolisani
Copy link
Contributor

@mgmolisani mgmolisani commented Apr 12, 2024

This restores functionality that seemed to have accidentally erased in a minor version update to converge the forked pdfkit vendor package. This resulted in all bookmarks being created in fit mode on the last page not respecting any of the props.

I additionally added some comments to roughly show where the custom logic of this file exists to give some signal that this should not be altered in future fork maintenance.

I tested this locally in a simple repro and observed both the raw output and the PDF in Adobe Reader were again properly linking to the page and respecting props.

There are no unit tests for the custom logic in this vendor package hence I did not add any new ones.

Resolves #2700
Resolves #2682

@changeset-bot
Copy link

changeset-bot bot commented Apr 12, 2024

🦋 Changeset detected

Latest commit: e993f89

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@react-pdf/pdfkit Patch
@react-pdf/layout Patch
@react-pdf/renderer Patch
@react-pdf/svgkit Patch
@react-pdf/examples Patch
@react-pdf/e2e-node-cjs Patch
@react-pdf/e2e-node-esm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@typesafeui
Copy link
Contributor

Nice! this probably closes #2682 too 🙌

@AgustinBilldin
Copy link

pls merge

@EvHaus
Copy link
Contributor

EvHaus commented Jun 23, 2024

Confirmed this fixes #2700 for me

@typesafeui
Copy link
Contributor

@diegomura @wojtekmaj can we merge this?

Copy link
Owner

@diegomura diegomura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pushing this. I really need to start using the base pdfkit thought 😞 Do you think you can try finding a way to fix this on react-pdf side?

@danomatic
Copy link

Polite bump. I've been pinned to an old version of @react-pdf/pdfkit for months to avoid the bugs this resolves.

@mgmolisani
Copy link
Contributor Author

mgmolisani commented Dec 11, 2024

Thanks for pushing this. I really need to start using the base pdfkit thought 😞 Do you think you can try finding a way to fix this on react-pdf side?

I think since this is a regression from the original behavior in this lib and is blocking consumers from updating, its probably best to get this merged and then consider making changes to the vendor source package. I think blocking new features might be appropriate to steer the ship in that direction but fixing the regression should be priority # 1.

@diegomura diegomura changed the title Add back functionality for bookmark props fix: add back functionality for bookmark props Sep 23, 2025
@diegomura diegomura merged commit 5cbe2fb into diegomura:master Sep 23, 2025
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 this pull request may close these issues.

Bookmarks all link to last page in document Outline links link to the page instead of the actual element

6 participants