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

The default underlines of link (<a>) tags continue past the link into the remainder of the sentence. #1311

Open
DerekRobin opened this issue Nov 28, 2024 · 0 comments
Labels

Comments

@DerekRobin
Copy link

When creating a link using an <a></a> tag and pdf.write_html(), the underline which normally appears on links continues past the link and throughout the remainder of the sentence.

Error details
No exceptions are raised

Minimal code

from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.write_html(
    """
    The default <a href="https://www.google.com/" target="_blank">link underline</a> continues past the end of the link.
    """
)
pdf.write_html(
    """
    <a href="https://www.google.com/" target="_blank">It also occurs</a> when the link starts the sentence.
    """
)
pdf.output("link.pdf")

Screenshot of output PDF
link.pdf

Environment
Please provide the following information:

@DerekRobin DerekRobin added the bug label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant