You need to sign in to do that
Don't have an account?
subodh chaturvedi 17
how to bring the Checkbox in pdf through visualforce page
Hi ,
I have a requirement Where i have a wrapper page multiple checkboxes with Values in a vf page & on the same vf page i have a custom Button so when i click on that button the copy of the vf page should open in pdf but the hurdle is the checkbox is not displaying in pdf how i can bring the checkboxes either Checked & unchecked values of it bcoz it will change based On new Record Open .
I have a requirement Where i have a wrapper page multiple checkboxes with Values in a vf page & on the same vf page i have a custom Button so when i click on that button the copy of the vf page should open in pdf but the hurdle is the checkbox is not displaying in pdf how i can bring the checkboxes either Checked & unchecked values of it bcoz it will change based On new Record Open .
Instead of Input checkbox, you can use Salesforce standard image to display checkbox as below.
Visualforce Page:
- https://developer.salesforce.com/forums/?id=906F0000000999tIAA
- https://salesforce.stackexchange.com/questions/56259/add-checkbox-to-vf-page-renderas-pdf
hope it helps.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
I tried your approch by adding the Images in the Vf page through static resource but the problem is i want the checkbox checked & unchecked same as in My vf wrapper page currently . suppose 10 checkbox are checked & 15 are unchecked randomly in a wrapper page so that same checkboxes should appear in pdf.
<apex:page standardController="Account" extensions="SolutionParticipationPDFController" sidebar="False" renderAs="Pdf" standardStylesheets="true" applyHtmlTag="false" showHeader="false" >
<head>
<style>
@page {
size: A4 landscape;
margin: 25mm;
@top-center {
content: "Key Solutions Inventory";
font-family: sans-serif, Arial, Helvetica !important;
}
@bottom-center {
content: counter(page);
}
}
body, p, label, table, td, tr, th
{
font-family: sans-serif, Arial, Helvetica !important;
font-size :9px;
}
@page {
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
}
}
</style>
</head>
<body>
<apex:form >
<apex:pageBlock >
<table style="border-collapse: collapse;padding:50px; font-size:5px">
<tr>
<apex:repeat value="{!resultPickValuesMap}" var="M">
<td style="vertical-align: top;padding:20px;text-align:left; font-size:10px">
<b style="text-align:center;">{!M}</b><br/>
<apex:repeat value="{!resultPickValuesMap[M]}" var="temp">
<table>
<tr>
<td style="padding-top:5px;">
<apex:image url="{!$Resource.Unchecked_Checkbox}" value="{!temp.isSelected}" width="9" height="9" />
<!-- <apex:inputcheckbox value="{!temp.isSelected}" />-->
<!-- <apex:commandLink id="theLink" action="{!solutionList}" target="_blank"> -->
<apex:param assignTo="{!solName}" value="{!temp.value}" name="solName"/>
<apex:outputText value="{!temp.value}"/>
<!-- </apex:commandLink> -->
</td>
</tr>
</table>
</apex:repeat>
</td>
</apex:repeat>
</tr>
</table>
</apex:pageblock>
</apex:form>
</body>
</apex:page>