I am trying to put some styling to my table with a border-radius in my visualforce page but when rendered to pdf I dont see the rounded corners. Is this not possible with render to PDF and if not are there any suggestions to get rounded forms in render to pdf?
I tried:
<table style="border: 1px solid black; border-radius:50px">
and
<apex:page standardController="Quote" renderAs="advanced_pdf" cache="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="false" showHeader="false" sidebar="false">
<html>
<head>
<style type="text/css" media="print">
.rcorners1 {
border-radius: 50px;
border: 2px solid #000;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<p class="rcorners1">..</p>
</body>
<html>
</apex:page>
If anyone wants to try this for a solution:
<apex:page standardController="Quote" renderAs="advanced_pdf" cache="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="false" showHeader="false" sidebar="false">
<html>
<head>
<style>
.rcorners1 {
border-radius: 50px;
border: 2px solid #000;
padding: 20px;
width: 200px;
height: 150px;
}
@media print {
border-radius: 50px;
border: 2px solid #000;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<table style="border: 1px solid black; border-radius:50px">
<tr>
<td>
test
</td>
</tr>
</table>
<p class="rcorners1">Lets look if this works</p>
</body>
</html>
</apex:page>
Best Answer
Try putting your style tag within the head tag.