[SalesForce] Pageblocktable to be rendered as table in PDF

I have a VF code below where I am trying to display the related list of an object using and command. I am rendering this page as PDF , doing that in my PDF I am unable to see the content in a tabular format. How can I make the content appear in a table?

    <apex:pageBlockSection columns="1" title="TECHNICAL ASSESSMENT">

        <apex:repeat value="{!interviewSkillReviews}" var="interview">

            <table border="1" cellpadding="6">
                <apex:pageblockTable value="{!interview.Skill_review__r}" var="skillreview">

                    <apex:column headerValue="Skill Name">                                
                        <apex:outputText value="{!skillreview.Skill__r.Name}"/>
                    </apex:column>
                <apex:column headerValue="Recommended Level">
                    <apex:outputText value="{!skillreview.Level__r.Name}"/>
                </apex:column>

                <apex:column headerValue="Rating">
                    <apex:outputField value="{!skillreview.RatingCopy__c}" rendered="{!NOT(interviewerMode)}" />
                    <apex:selectList value="{!rating}" multiselect="false" size="1" rendered="{!interviewerMode}">
                        <apex:selectOption itemValue="1" itemLabel="1"/>
                        <apex:selectOption itemValue="2" itemLabel="2"/>
                        <apex:selectOption itemValue="3" itemLabel="3"/>
                        <apex:selectOption itemValue="4" itemLabel="4"/>
                        <apex:selectOption itemValue="5" itemLabel="5"/>
                    </apex:selectList>
                </apex:column>

                <apex:column headerValue="Rating Level Description">
                    <apex:outputText value="{!skillreview.Skill_Level_Description__c}"/>
                </apex:column>


            </apex:pageblockTable>
        </table> 
    </apex:repeat>
</apex:pageBlockSection>

I tried using <table> command of HTML but I just get a border around the pageblocktable.

enter image description here

Example of table look and feel:

enter image description here

Best Answer

The PDF renderer sensibly skips a lot of styling as the usual Visualforce look isn't something that you're going to want on paper.

The pageBlockTable should work but in these situations I do prefer to use standard HTML elements so that I'm not having to experiment too much with what is and what isn't supported. You should be able to specify the following CSS to hide the borders you're seeing:

table
{
    border-collapse: collapse;
    border: none;
}
Related Topic