tuhler
10 months agoNew Contributor III
Availability to add a custom font to PDF export
We have a client with a custom font that they would like to apply to reports that are exported to PDF. Has anyone come across this as an option?
Thank you
Easier than you might expect:
- install the font in Windows on OneStream servers (app and web)
- specify it in your format properties: FontFamily = [My Custom Font]
- ...
- Profit!
The only drawback is that you cannot differentiate between Data Explorer and PDF reports, the same font will be used for both. You can change size and color only.
As proof, I attach a screenshot of the classy Bauhaus 93 font in action, so called because nobody ever used it after 1993. The particularly hideous "Coral" color was chosen to further stress the idea that the product will express no judgement on one's terrible taste.
EDIT 2024-04-11: It turns out that there are a few caveats.
- Any font has to be installed on the CLIENT machine.
- If using a nonstandard font, PDF reports might not be able to use it in v8+ (unclear why, for now). As a workaround, we can use a Cube View Extender that will set the font dynamically - in which case, the font will be picked up and displayed in the report. Example:
' in CV Extender "_TestFont" [...] Case Is = CVExtenderFunctionType.FormatReportUIItem Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem If uiItem.UIItemType = XFReportUIItemType.RowHeaderLabel Then uiItem.FontFamily = "Bauhaus 93" End If