OpenPDF is a free Java library for creating and editing PDF files, with a LGPL and MPL open source license. OpenPDF is based on a fork of iText. We welcome contributions from other developers. Please feel free to submit pull-requests and bugreports to this GitHub repository.
Other
3.61k
stars
597
forks
source link
styleSheet.loadTagStyle for A href link with underscore in PDF #1232
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) {
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