2

I am generating a quote page to show information regarding the client and have run into an issue where the table I use for formatting the information's location is somehow causing the PDF to fail generation.

Table causing the issue:

<table style="width: 100%;">
        <tr>
            <apex:outputPanel rendered="{!Opportunity.Id != null}">
            <td class="pull-left">
                <h1>{!thisOpp.Name}</h1>
            </td>
            </apex:outputPanel>
            <td class="pull-right">
                <h1>RTO</h1>
            </td>
        </tr>

        <tr>
            <apex:outputPanel rendered="{!Opportunity.Id != null}">
            <td class="pull-left">
                {!thisAccount.Name}
                <br />
                {!thisAccount.BillingStreet}
                <br />
                {!thisAccount.BillingCity}, {!thisAccount.BillingState} {!thisAccount.BillingPostalCode}
            </td>
            </apex:outputPanel>
            <td class="pull-right">
                Created Date: {!nowEST}
                <br />
                <apex:outputPanel rendered="{!Opportunity.Id != null}">
                    Opportunity Number: {!thisOpp.Opportunity_Number__c}
                    <br />
                </apex:outputPanel>
                Terms: {!contractYears} Years
            </td>
        </tr>
    </table>
1

I think the problem is with using inline CSS as per this link.

If you use inline CSS styles, set the API version to 28.0 or later. Also set , and add static, valid and tags to your page, as in the previous example.

Generally using table and complex html tags is not recommended when rendering page as pdf. You might get different results on different browsers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.