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

Links breaks when use addPage with another size #2801

Open
MarceloZapatta opened this issue Jul 6, 2020 · 5 comments
Open

Links breaks when use addPage with another size #2801

MarceloZapatta opened this issue Jul 6, 2020 · 5 comments

Comments

@MarceloZapatta
Copy link
Contributor

Hi!

I'm facing an issue, links breaks when .addPage() with another format than the initial size, apparently the position of the link became incorrect.

Reproduce:

  • Start new doc with an specific size
  • Put some link anywhere in the first page
  • addPage() with an different size
  • The link inserted in the first page doesn't respect anymore the position passed.

Notice that this occurs with textWithLink and also link(). If the addPage() has the same size of initial format links work's just fine. I made an fiddle to help:

Works:
https://jsfiddle.net/MarceloZapatta/don4hqtj/

Breaks:
https://jsfiddle.net/fL403sja/2/

@HackbrettXXX
Copy link
Collaborator

Yes, that's a bug. The links are written when the pages are finalized. Here the getHorizontal/VerticalCoordinateString functions are no longer valid (they use the dimensions of the last active page). The final bounds need to be stored when the link function is executed.

@rahil1304
Copy link

Hey
I would love to work on this issue. Could you please provide some more information on it?

@HackbrettXXX
Copy link
Collaborator

Thanks! What additional information do you need exactly?

@HackbrettXXX
Copy link
Collaborator

@rahil1304 I just realized that @MarceloZapatta already made a PR, sorry about that.

@Setha77
Copy link

Setha77 commented Jan 2, 2024

@HackbrettXXX Hi this issue has been resolved since 3 years can you close it ?

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

No branches or pull requests

4 participants