This topic contains 3 replies, has 0 voices, and was last updated by sney 9 years, 1 month ago.
-
AuthorPosts
-
October 14, 2015 at 3:00 pm #2100
sneyI have an issue with rendering different fonts on an Advanced Template.
Basically, we have chosen to use Arial on most of the form, with a few select bits in Verdana. In my css the styles contain one of the following lines:
Code:
font-family: arial,helvetica,sans-serif;or
font-family: verdana,geneva,sans-serif;
In WYSIWYG mode, the fonts show fine, each one is displayed as specified. After clicking Preview, the PDF renders using Helvetica for both after saving and testing the template on an actual transaction it also uses Helvetica for both.I can easily pick Helvetica from Arial and Verdana, there’s a few tell-tale differences so I’m 100% sure about this.
This confused me because Helvetica wasn’t even specified in one of the font families. I tested on another person’s machine and the same happened: WYSIWYG was fine, renders were not. There was one difference however – that person’s machine rendered all fonts in Arial.
It was countless hours of testing that led me to the reason for this difference: my browser has Helvetica set as the default sans-serif font, and my colleague’s browser has Arial specified. So in each case it seems to be skipping the named fonts and settling on the generic family font: ‘sans-serif’, thereby relying on the browser’s settings.
I have checked my code above and it matches that present in one of the default templates. I have also tested this on a default template by doing nothing more than changing one bit of text to Verdana and Previewing it – same results.
I have also tried Capitalising the font names, and Arial and Verdana are definitely present on all our machines here (they’re pretty standard). I am sticking to the built-in NetSuite fonts too…
I cannot get this to work. Has anyone else had success or the same trouble?
Cheers
This is a cached copy. Click here to see the original post. -
October 14, 2015 at 4:30 pm #2101
michoelHave a look at page 30 of this document for more info about how BFO renders fonts:
http://bfo.com/products/report/docs/userguide.pdf
Every report created by the Report Generator can display the standard 5 fonts available in all PDF documents – Times, Helvetica and Courier, as well as the “Symbol” and “ZapfDingbats” fonts. Times, Helvetica and Courier can also be referred to by the generic CSS2 names of “serif”, “sans-serif” and “monospace”.
If you need another font, you can embed it into the PDF:
HTML Code:
Hello in an embedded TrueType font
-
October 14, 2015 at 4:34 pm #2102
sneyWell that would explain it…though NetSuite specifically states you can use any of the selectable fonts in WYSIWYG mode!
Off I go to test…
-
October 14, 2015 at 6:40 pm #2103
sneyThat worked!
So NetSuite’s online help regarding fonts is incorrect, at least for producing PDFs. I think from now on I’ll use NetSuite’s resources for NetSuite-specific stuff only (field Ids and record joins and the like) and use the official Freemarker and BFO reference for everything else
-
AuthorPosts
You must be logged in to reply to this topic.