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
Shaker Kuncham 1Shaker Kuncham 1 

Getting PDF content blank through VF email

Hi

Created a approval process on custom object and submitting the PDF document for approval process.
1. Approver is getting the email with the PDF document however with empty content.
Please find the below code :

<messaging:emailTemplate subject="test email temp subject" recipientType="User" relatedToType="Compliance_Documents__c">
<apex:image url="/servlet/servlet.FileDownload?file=015W0000000Dmru"
height="64" width="64"/>
    <messaging:htmlEmailBody >
        <html>
        <img src="http://www..com/ucmprdpub/groups/public/documents/logo/logo_png.png"/>
            <body>
            <p>Dear {!recipient.name},</p>
            
            <p>Attached is document related to Compliance Document "{!relatedTo.Compliance_Document_Name__c} ". </p>
            <p>Please Review the document and <B> Approve/Reject.</B> To approve or reject this item, click this link </p>
            <P>
                <apex:outputLink value="https://cs13.salesforce.com/{!relatedTo.id}">
                    Approve / Reject
                </apex:outputLink>
                <Br/><Br/>or <Br/><Br/>
                <B> To Approve through email :</B> reply to this email with one of these words in the first line of the email message: APPROVE, APPROVED.
                <Br/><Br/>
                <B> To Reject :</B> Please click on the above link.
                <Br/><Br/>
                <B>For Comments: </B>
If replying via email, you can also add comments on the second line. Comments will be stored with the approval request in Salesforce CRM.
            </P>
            <br/> <br/>
           <b> Previous approval history </b>

        <c:ApprovalItem recordId="{!relatedTo.Id}" />
         <br/>
          <br/>
        
            Kind Regards, <br/>
            Document Compliance Team
            
            </body>
        </html>
        
    </messaging:htmlEmailBody>
    <c:IncludeAttachments parentId="{!relatedTo.Id}"/>
    <!--<messaging:attachment renderAs="PDF" filename="{!relatedTo.Name}"></messaging:attachment>-->
</messaging:emailTemplate>