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

How to display check box in renderAs pdf
I need to convert vf page to pdf, In pdf i am not able to see the check boxs which are displyed in vf page and also having alignment issues.Does any one have suggestions.
As checkbox is an input element and you can display any element which is expecting input from user. So if you want to display the checkbox on PDF then you need to use the image of checkbox on visualforce page.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
All Answers
As checkbox is an input element and you can display any element which is expecting input from user. So if you want to display the checkbox on PDF then you need to use the image of checkbox on visualforce page.
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Ankit is right on.
I have done this many times myself. You need to use images.
I'd suggest you put them in a Static Resource. Use the apex:image tag and the rendered attributes.
You'll need two images. One for unchecked / one for checked.
What if we want real-time checkboxes. i.e the user can check/uncheck the checkbox in VF page (rendered as PDF) ???
Can you give a code snippet of how to use the images?
I tired uploading both checked and unchecked images to documents and then this
<apex:image value="/img/unchecked.jpeg" rendered="{!IF(lstCheck.Leg_Name__c==false,true,false)}"/>
<apex:image value="/img/checked.jpeg" rendered="{!IF(lstCheck.Leg_Name__c==true,true,false)}"/>
But I don't see any image on the PDF.
Is there something that I am missing?
Thanks
Alu.
I want real-time select/unselect checkboxes. i.e the user can check/uncheck the checkbox in rendered word/pdf doc.