Make return value in bold while Generating to PDF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:35 AM
Hi Team,
We have requirement to make return dynamic value (date )in bold , when using generate PDF document.
example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:42 AM
Hello @Pooja P
You can maybe try to wrap the text in html bold-tags:
var newDateString = '<b>the ' + dayWithSuffix + " day of " + fullMonthName + " " + year + '.</b>';
Let me know if this works!
Kr Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:44 AM
var newDateString= 'the ' + dayWithSuffix + " day of " + fullMonthName + " " + year + '.';
newDateString = '<p style="text-align: left;"><strong>' + newDateString + '</strong></p>';
return newDateString;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 12:58 AM
you can use the <b> tag
var newDateString = 'the ' + dayWithSuffix + " day of " + fullMonthName + " " + year + '.';
return '<b>'+newDateString+'</b>';
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 02:37 AM
Hi Everyone , i tried all the methods mentioned above its not helping below is the example where i am getting the return value instead of Bold.
<b>the 31ˢᵗ day of January 2025.</b>