You need to sign in to do that
Don't have an account?
jasonwanBella
the <apex:outputField > NOT ONLY doesnt take the regText style but it even changes the entire page to Arial font-size:9 for some reason. Ex: The productA.Quantity turns loses its custom style as well.
Once I take out outputField, every text on the form goes back to the custom way that I would want.
I was hoping to leverage the currency style form included in outputField to get the right formatting for Product Unit Price.
If there is another way to get the formatting for a currency field such as Unit Price, please let me know then I can avoid this outputField bug.
Thanks.
Visualforce renderAs PDF - outputfield changes my whole page of font
Code:
<style type="text/css"> @page { margin-top: 0%;} table{ font-family: "TTE19DCA30t00"; font-size:7pt; } .regText { font-size:7pt;} .boldText { font-size:7pt; font-weight:bold; } .titleText { font-size:12pt; font-weight:bold;} body { font-family: "TTE19DCA30t00"; font-size:7pt; } .space{ font-size:2pt; } </style> <table> <tr> <td class="regText" width="15%">{!productA.Quantity}</td> <td class="regText"><apex:outputField value="{!productA.UnitPrice}" /></td> </tr> </table>
the <apex:outputField > NOT ONLY doesnt take the regText style but it even changes the entire page to Arial font-size:9 for some reason. Ex: The productA.Quantity turns loses its custom style as well.
Once I take out outputField, every text on the form goes back to the custom way that I would want.
I was hoping to leverage the currency style form included in outputField to get the right formatting for Product Unit Price.
If there is another way to get the formatting for a currency field such as Unit Price, please let me know then I can avoid this outputField bug.
Thanks.
Also instead of Arial. Arial Unicode MS worked. However where I needed to display the font in bold, it did not worked.
Thank you,
It seems to me that when you use the outputField tag Salesforces creates some Javascript on the page. This seems to mess up the styling when you render the page in PDF format, but works fine in HTML format.
I need to use outputField as I have currencies on my page and I need to render them with decimal places in PDF format. Is there another way to output fields and format the way currencies they are rendered?
You need upload a style sheet as a static resource and add it then to the visualforce pages and not include the styles on the actual visualforce page.
I.E upload a static resource called "CSS_Style" to your org then add this tag to your VF page
To get Arial and bold font weight, I used this code
Hope this will work for you too