-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix links break on addPage with different size #2943
Conversation
Thanks. Could you also add a unit test, please? https://github.com/MrRio/jsPDF/blob/master/CONTRIBUTING.md#building-and-testing-jspdf |
@HackbrettXXX I dont have too much knowledge in tests, but i tried to write one. I created a reference file to compare when the link is written wrong, but it only passes on Chrome / Firefox. Looks like the fails is not related with the previous issue. Not sure how to write this test to compare the PDF only for the position of the link, can you help me? |
Thanks for adding a test case. The issue seems to be small floating point differences. In order to fix this you can add the |
@HackbrettXXX Thanks for the tip! It worked like a charm. Fixed the unit test, also moved into annotations.spec.js that make more sense. |
Thanks :) |
This PR will fix the #2801.
Writes the links with calculated final bounds on link function.