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

styleSheet.loadTagStyle for A href link with underscore in PDF #1232

Open
wider2 opened this issue Nov 7, 2024 · 2 comments
Open

styleSheet.loadTagStyle for A href link with underscore in PDF #1232

wider2 opened this issue Nov 7, 2024 · 2 comments
Labels

Comments

@wider2
Copy link

wider2 commented Nov 7, 2024

Sorry for style question, but library cannot provide right behavior

if I try to add rules about link with underscore, it will never be rendered in PDF as link with underscore.
it is look like text-decoration does not work

    final StyleSheet styleSheet = new StyleSheet();
    styleSheet.loadTagStyle("a", "color", "blue");
    **styleSheet.loadTagStyle("a", "text-decoration", "underline");**
    final Map<String, Object> interfaceProps = new HashMap<>();
    try {
        final List<Element> pdfElements = HTMLWorker.parseToList(reader, styleSheet, interfaceProps);
        for (final Element elem : pdfElements) {
            textCell.addElement(elem);
        }
    } catch (IOException e) {
@wider2 wider2 added the bug label Nov 7, 2024
@wider2
Copy link
Author

wider2 commented Nov 7, 2024

The only 1 solution i have found is
styleSheet.loadTagStyle("a", "style", "text-decoration:underline;");

@natl-set
Copy link

Sounds like it works as expected. text-decoration is only applicable with style attribute.

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

2 participants