You need to sign in to do that
Don't have an account?

Overriding style in pdf file
Hi there
I'm trying to hide pageblock buttons in my visual force page using my custom <style></style>. But when I`m rendering it as a pdf, button still appears on the pdf.
Could anyone have any idea?
I appreciate any comment.
Hello YoYo;
Wrap your <style> tags with <head> tags as below and retry.
<apex:page controller="MyController" tabstyle="contact">
<head>
<style>
.btn { display:none; }
</style>
</head>
<apex:detail subject="{!contactid}" relatedList="false" title="false"/>
</apex:page>
All Answers
<apex:page controller="MyController" tabstyle="contact"> <style> .btn { display:none; } </style> <apex:detail subject="{!contactid}" relatedList="false" title="false"/> </apex:page>
where contactid is a public property that returns a contact id in MyController.
Hello YoYo;
Wrap your <style> tags with <head> tags as below and retry.
<apex:page controller="MyController" tabstyle="contact">
<head>
<style>
.btn { display:none; }
</style>
</head>
<apex:detail subject="{!contactid}" relatedList="false" title="false"/>
</apex:page>
Helped me as well! Should have gone back to the basics. is there any advanced documentation specifying the limitation of rendering HTML as PDF content?