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
Heather_HansonHeather_Hanson 

PDF generation failed. Check the page markup is valid as a result of using render to group items

Trying to make updates to an existing form that we also render as PDF.  The HTML version of the form worked fine with my changes, but as usual, I'm having trouble with rendering as PDF.

I basically want to group products in their own box based on the Product Type. 

An example is below, but when I add the second datatable with the new category, I get the PDF generation error message.  I checked to make sure I didn't make a mistake somewhere by duplicating the first one and that worked (so I had two groups with the same set of products), so it seems just when I try to pull a different batch of products that the error message occurs.  

My product type name is correct and there are values available (as I know if there is no value sometimes this also causes a generation fail).

Does anyone have any suggestions as to how I can fix this?
<apex:dataTable value="{!Opportunity.opportunityLineItems}" var="OP" style="width:98.7%">
                  <apex:column rendered="{!OP.Product_Type__c = 'Mandatory'}" headerValue="Item" value="{!OP.ProductCode}" headerClass="column_ttl tal" styleClass="tbl_bdr tal" style="width:8%;"></apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Mandatory'}" headerValue="{!set}" value="{!OP.Set__c}" headerClass="column_ttl tal" styleClass="tbl_bdr tal" style="width:5%;"></apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Mandatory'}" headerValue="{!lblQty}" headerClass="column_ttl tac" styleClass="tbl_bdr tac" style="width:5%;"><apex:outputText value="{0, number,###,###,##0}"><apex:param value="{!OP.Quantity}" /></apex:outputText></apex:column>
                  <apex:column headerValue="Description" value="{!OP.PriceBookEntry.Name}" headerClass="column_ttl" styleClass="tbl_bdr" rendered="{!OP.Product_Type__c = 'Mandatory' && Opportunity.Language__c = 'ENGLISH'}"></apex:column>
                  <apex:column headerValue="Description" value="{!OP.Product2.Product_name_french__c}" headerClass="column_ttl" styleClass="tbl_bdr" rendered="{!OP.Product_Type__c = 'Mandatory' && Opportunity.Language__c = 'FRENCH'}"></apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Mandatory'}" headerValue="{!lblMonthPrice}" headerClass="column_ttl tac" styleClass="tbl_bdr tar" style="width:15%;">
                	<apex:outputText value="{0, number,###,###,##0.00}" rendered="{!OP.Payment_Description__c = 'Monthly'}">$<apex:param value="{!OP.UnitPrice}" /></apex:outputText>
                	<apex:outputText value="$0.00"  rendered="{!OP.Payment_Description__c != 'Monthly'}"/>
                  </apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Mandatory'}" headerValue="{!lblOneChrg}" headerClass="column_ttl tac" styleClass="tbl_bdr tar" style="width:15%;" >
                    <apex:outputText value="{0, number,###,###,##0.00}" rendered="{!OP.Payment_Description__c = '1X Fee'}">$<apex:param value="{!OP.UnitPrice}" /></apex:outputText>
                	<apex:outputText value="$0.00"  rendered="{!OP.Payment_Description__c != '1X Fee'}"/>
                  </apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Mandatory'}" headerValue="{!lblSubTot}" value="{!OP.TotalPrice}" headerClass="column_ttl tac" styleClass="tbl_bdr tar" style="width:15%;"></apex:column>
                </apex:dataTable>
              <br/>
                <apex:dataTable value="{!Opportunity.opportunityLineItems}" var="OP" style="width:98.7%">
                  <apex:column rendered="{!OP.Product_Type__c = 'Base'}" headerValue="Item" value="{!OP.ProductCode}" headerClass="column_ttl tal" styleClass="tbl_bdr tal" style="width:8%;"></apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Base'}" headerValue="{!set}" value="{!OP.Set__c}" headerClass="column_ttl tal" styleClass="tbl_bdr tal" style="width:5%;"></apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Base'}" headerValue="{!lblQty}" headerClass="column_ttl tac" styleClass="tbl_bdr tac" style="width:5%;"><apex:outputText value="{0, number,###,###,##0}"><apex:param value="{!OP.Quantity}" /></apex:outputText></apex:column>
                  <apex:column headerValue="Description" value="{!OP.PriceBookEntry.Name}" headerClass="column_ttl" styleClass="tbl_bdr" rendered="{!OP.Product_Type__c = 'Base' && Opportunity.Language__c = 'ENGLISH'}"></apex:column>
                  <apex:column headerValue="Description" value="{!OP.Product2.Product_name_french__c}" headerClass="column_ttl" styleClass="tbl_bdr" rendered="{!OP.Product_Type__c = 'Base' && Opportunity.Language__c = 'FRENCH'}"></apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Base'}" headerValue="{!lblMonthPrice}" headerClass="column_ttl tac" styleClass="tbl_bdr tar" style="width:15%;">
                	<apex:outputText value="{0, number,###,###,##0.00}" rendered="{!OP.Payment_Description__c = 'Monthly'}">$<apex:param value="{!OP.UnitPrice}" /></apex:outputText>
                	<apex:outputText value="$0.00"  rendered="{!OP.Payment_Description__c != 'Monthly'}"/>
                  </apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Base'}" headerValue="{!lblOneChrg}" headerClass="column_ttl tac" styleClass="tbl_bdr tar" style="width:15%;" >
                    <apex:outputText value="{0, number,###,###,##0.00}" rendered="{!OP.Payment_Description__c = '1X Fee'}">$<apex:param value="{!OP.UnitPrice}" /></apex:outputText>
                	<apex:outputText value="$0.00"  rendered="{!OP.Payment_Description__c != '1X Fee'}"/>
                  </apex:column>
                  <apex:column rendered="{!OP.Product_Type__c = 'Base'}" headerValue="{!lblSubTot}" value="{!OP.TotalPrice}" headerClass="column_ttl tac" styleClass="tbl_bdr tar" style="width:15%;"></apex:column>
                </apex:dataTable>