You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though with DynamicReports I can only use a workaround via hyperlinks:
public ComponentBuilder<?, ?> getValue(final String name, final String value) {
final TextFieldBuilder<String> nameCmp = DocumentReports.cmp.text(name + ":").setFixedWidth(nameWidth);
if (tooltip != null) {
final String tooltipAdj = newTooltipString(tooltip);
nameCmp.setHyperLink(DocumentReports.hyperLink(tooltipAdj).setTooltip(tooltipAdj));
}
final TextFieldBuilder<String> valueCmp = DocumentReports.cmp.text(value).setFixedWidth(valueWidth);
return DocumentReports.cmp.horizontalList(nameCmp, valueCmp);
}
public static String newTooltipString(final String tooltip) {
//some characters break tooltips from working in pdfs
return "-> " + Strings.stripNonPrintableAscii(Currencies.replaceCurrencySymbolsWithCurrencyCode(
tooltip.replace(":", "_").replace(PercentScale.PERMILLE.getSymbol(), "permille")));
}
Though this does not work well with evince, because it fails to show the tooltip from a broken hyperlink. (but one can copy the hyperlink address to read the tooltip with the above workaround). It works in Adobe Acrobat Reader, Foxit Reader and Okular for example. It does not work for pdf reader inside Firefox and Chrome. Also older versions of Adobe Acrobat Reader trimmed the hyperlink tooltips, so only half of it can be read.
Would there be a way to support direct tooltips (there seems to be a standardized \pdftooltip command)?
I also found this regarding JasperReports where it seems to be possible to set hyperlink targets (but variations of this disable tooltips on all pdf readers): https://stackoverflow.com/questions/10734834/tooltip-for-text-titles-headers-in-ireports http://jasperreports.sourceforge.net/sample.reference/hyperlink/index.html#hyperlinks
The text was updated successfully, but these errors were encountered:
Most pdf viewers already support tooltips: https://gitlab.freedesktop.org/poppler/poppler/-/issues/34
Though with DynamicReports I can only use a workaround via hyperlinks:
Though this does not work well with evince, because it fails to show the tooltip from a broken hyperlink. (but one can copy the hyperlink address to read the tooltip with the above workaround). It works in Adobe Acrobat Reader, Foxit Reader and Okular for example. It does not work for pdf reader inside Firefox and Chrome. Also older versions of Adobe Acrobat Reader trimmed the hyperlink tooltips, so only half of it can be read.
Would there be a way to support direct tooltips (there seems to be a standardized \pdftooltip command)?
I also found this regarding JasperReports where it seems to be possible to set hyperlink targets (but variations of this disable tooltips on all pdf readers): https://stackoverflow.com/questions/10734834/tooltip-for-text-titles-headers-in-ireports
http://jasperreports.sourceforge.net/sample.reference/hyperlink/index.html#hyperlinks
The text was updated successfully, but these errors were encountered: