function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
llisallisa 

Try to Hide a row but gives Error - PDF generation failed. Check the page markup is valid.

Here Freight is a field from Account object,i create a pdf for this along with other data objects.
The Requirement is like if  there is some value in the Freight field then only its row appear in the Pdf else the row is not at all present.
User-added image
here the Freight value field is Empty so the whole row Freight along with value must be hidden.

I wrote this code but it gives the Error --PDF generation failed. Check the page markup is valid.
Give me some idea about this.


<tr>
<apex:outputPanel rendered="{!if(Account.freight__c!=null,true,false)}">
      <td style="text-align: center; border-right:solid 1px; border-top: 1px solid #000000; width:80%" >
           Freight 
      </td>
     <td style="text-align: center; border-top: 1px solid #000000; width:20%">
          <apex:param value="{!Account.freight__c}" />
     </td>
</apex:outputPanel>
</tr>
AndrewTaylorAndrewTaylor
You could try something like: 
 
<tr>
      <td style="text-align: center; border-right:solid 1px; border-top: 1px solid #000000; width:80%;display:{!if(Account.freight__c!=null,'block','none')}" >
           Freight 
      </td>
     <td style="text-align: center; border-top: 1px solid #000000; width:20%;display:{!if(Account.freight__c!=null,'block','none')}">
          <apex:param value="{!Account.freight__c}" />
     </td>
</tr>

 
llisallisa
Hi  aj2taylo2010,
Thanks a lot for your reply.But it gives the same error PDF generation failed. Check the page markup is valid.