+ Start a Discussion
Shaker Kuncham 1Shaker Kuncham 1 

Getting PDF content blank through VF email


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 >
        <img src="http://www..com/ucmprdpub/groups/public/documents/logo/logo_png.png"/>
            <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>
                <apex:outputLink value="https://cs13.salesforce.com/{!relatedTo.id}">
                    Approve / Reject
                <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.
                <B> To Reject :</B> Please click on the above link.
                <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.
            <br/> <br/>
           <b> Previous approval history </b>

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