You need to sign in to do that
Don't have an account?
How to change font-family to arial when the vf page is rendered as PDF?
I have rendered a vf page as pdf. I am unable to change the fon-family to arial.
I have used
<style type=text/css>
p
{
font-family:"Arial Unicode MS";
font-size:14pt;
}
span
{
font-family:"Arial Unicode MS";
font-size:8pt;
}
h1
{
font-family:"Arial Unicode MS";
font-size:9pt;
}
</style>
<p>some text1</p>
<span>some text2</span>
<h1>some text3</h1>
--- - -- - - -- - -
- - - - - - - --
But the problem here is am getting a new line everytime I use <p> and <h1> tag.
I dno't want this new line to occur.
Also I tried using <h2>,<h3>,.. , <pre>, <b> and
display:inline;
How to get the font family as arial without a new line. Also how to make the text bold?
I have tried <b> tag and
font-family:"Arial Unicode MS Bold";
Its not working.
Pls help.
Hi,
Try this code:
<apex:page renderAs="pdf" standardController="Account">
<body>
<span style="font-family: Arial Unicode MS;font-size: 14px; font-weight: bold; vertical-align: text-bottom;">Text1</span>
<span style="font-family: Arial Unicode MS;font-size: 9px; vertical-align: text-bottom;">Text2</span>
<span style="font-family: Arial Unicode MS;font-size: 8px;font-weight: bold; vertical-align: text-bottom;">Text3</span>
</body>
</apex:page>
Regards,
Taani
All Answers
I don't think you can apply any style with reder as pdf.
Hi,
Try this code:
<apex:page renderAs="pdf" standardController="Account">
<body>
<span style="font-family: Arial Unicode MS;font-size: 14px; font-weight: bold; vertical-align: text-bottom;">Text1</span>
<span style="font-family: Arial Unicode MS;font-size: 9px; vertical-align: text-bottom;">Text2</span>
<span style="font-family: Arial Unicode MS;font-size: 8px;font-weight: bold; vertical-align: text-bottom;">Text3</span>
</body>
</apex:page>
Regards,
Taani