Skip to content

Feature Request: textWithLink multiple line support #3253

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

Closed
simse07 opened this issue Sep 8, 2021 · 5 comments
Closed

Feature Request: textWithLink multiple line support #3253

simse07 opened this issue Sep 8, 2021 · 5 comments

Comments

@simse07
Copy link

simse07 commented Sep 8, 2021

Hello! Is there the plan to support multiple lines in the textWithLink annotation?
As the documentation points out, it only supports single line text atm.

If the text is broken into multiple lines, the clickable link area should be extended to all lines, not only the first line.
In the following example only the first line can be clicked, but it would be great if the second line can be clicked too:

var link = "http://very-long-http-link-to-generate-a-line-break.com/second-line-starts"
var doc = new jsPDF();
doc.setFontSize(20);
doc.textWithLink(link, 20, 30, { maxWidth: 160, url: link});
doc.save('Test.pdf');

Test.pdf

@HackbrettXXX
Copy link
Collaborator

Yes, I agree, this should be supported. Currently, there are no plans to implement it, but I'll merge a pull request, if you provide one.

@Goku-kun
Copy link
Contributor

Goku-kun commented Oct 1, 2021

Hey, @HackbrettXXX

I'd like to pick up this issue if it hasn't been assigned to anyone else. Could you kindly direct me to some documentation that'd help me with it?

Thank you.

@Goku-kun
Copy link
Contributor

Goku-kun commented Oct 1, 2021

Hey, @HackbrettXXX.

It seems some of the tests in the master branch are failing. What should I do about my pull request if those tests are failing?
I'll submit a pull request tagging this issue.

@richardtorres314
Copy link
Contributor

Does the merged PR address this issue?

@HackbrettXXX
Copy link
Collaborator

Yes, it does. We can close this now.

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