• Bob Drake
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

User-added imageHere, Service Hours is displaying HTML tags along with Value. How to remove and get only instead. Here is the VF page Code:

<apex:page controller="ResourceSearchPDFController" sideBar="false" showHeader="false" standardStylesheets="false" applyHtmlTag="false"
    applyBodyTag="false" docType="html-5.0" renderAs="pdf">

    <head>
        <style>
            @page {
                size: A4;
                margin: 35mm 5mm 35mm 5mm;

                @bottom-right {
                    content: element(info);
                }

                @top-center {
                    content: element(title);
                }

                @bottom-center {
                    content: element(footer);
                }
            }

            body {
                font-family: "Salesforce Sans";
                font-size: 14px;
            }

            .page-break {
                display: block;
                page-break-after: always;
            }

            .page-number::after {
                font-family: "Arial" "Sans-Serif";
                font-size: 10px;
                content: counter(page)
            }

            table {
                page-break-inside: avoid;
            }

            td {
                vertical-align: top;
            }

            .pages:after {
                font-family: "Arial" "Sans-Serif";
                font-size: 10px;
                content: counter(pages)
            }

            .service-table {
                width: 100%;
                border-collapse: collapse;
                table-layout: fixed;
                margin-bottom: 10px;
            }

            .service-table td {
                border: 1px solid black;
                padding: 0;
            }

            .service-table tr {
                page-break-inside: avoid;
                page-break-after: auto;
            }

            .service-title {
                font-weight: 700;
                font-size: 20px;
                padding: 10px !important;
                text-align: center;
            }

            .service-title div,
            .service-taxonomy div {
                overflow: hidden;
            }

            .info {
                font-size: 12px;
                text-align: right;
                position: running(info);
            }

            ul {
                padding: 0px;
                margin: 0px;
                padding-left: 15px;
            }

            .title {
                text-align: center;
                font-size: 30px;
                position: running(title);
            }

            .title div {
                height:100px;
            }

            .title  img {
                margin-top: 20px;
                height: 100px; 
                position: absolute;
                right: 0;
                top: 0;
            }          

            .footer{
                text-align: center;
                position: running(footer);
            }  

            .footer img {
                height: 70px;
            }

            .grid-container {
                display: table;
                table-layout: fixed;
                border-collapse: collapse;
                width: 100%;
                height: 100%;
                padding: 5px;
            }
            

            .grid-container div {
                padding: 5px;
                display: table-row;
                page-break-inside: auto;
                page-break-after: auto;
            }

            .grid-container div div {
                display: table-cell;
                word-wrap: break-word;
                border-right: 1px solid;
                border-bottom: 1px solid;
            }

            .grid-container div div:first-child {
                width: 100px !important;
            }

            .service-field {
                font-weight: 700;
            }

            p{
                text-overflow: clip;
            }
        </style>
    </head>

    <div class="info">
        <div>Page
            <strong>
                <span class="page-number"></span>
            </strong> of
            <strong>
                <span class="pages"></span>
            </strong>
        </div>
    </div>

    <div class="footer">
        <!-- <img src="{!URLFOR($Resource.PDFAssets, 'footerMHUW.jpg')}"/> -->
    </div>

    <div class="title">
        <div>Services Referral</div>
        <img src="{!URLFOR($Resource.PDFAssets, '211-logo-2019-rgb.png')}"/>
    </div>

    <body>
        <div class="container">
            <!-- updated on 04/06/2020 -->
            <apex:repeat value="{!wrapperClassList}" var="wrap">
                <apex:repeat value="{!wrap.siteWrapper}" var="location">
                <table class="service-table" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td class="service-title" colspan="5">
                            <div>{!wrap.serviceRecord.Name + ' - ' + wrap.serviceRecord.Account__r.Name}</div>
                        </td>
                    </tr>
                    
                    <tr>
                        <td><div class="service-field">Service Description: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div><apex:outputText value="{!wrap.serviceRecord.ServiceDescription__c}" escape="false"/></div>
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td><div class="service-field">Service Hours of Operation: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div>
                                    <!-- <apex:repeat value="{!service.Hours_of_Operations__r}" var="hourOp"> -->
                                            <apex:outputText value="{!wrap.serviceRecord.Service_Hours_of_Operation__c}" escape="false"/>
                                    <!-- </apex:repeat> -->
                                </div>
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td><div class="service-field">Service Contact Phone: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div><apex:outputText value="{!wrap.serviceRecord.Service_Contact_Phone__c}"/></div>
                            </div>
                        </td>
                    </tr>

                    <!-- Contact phone? -->
                    
                    <tr>
                        <td><div class="service-field">Intake Procedure: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div><apex:outputText value="{!wrap.serviceRecord.Intake_Procedure__c}" /></div>
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td><div class="service-field">Intake Requirements: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div><apex:outputText value="{!wrap.serviceRecord.IntakeRequirements__c}" escape="false"/></div>
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td><div class="service-field">Address: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div>
                                    <!--apex:repeat value="{!service.All_Service_s_Sites__r}" var="location"-->
                                    <!-- <apex:repeat value="{!sitesList}" var="location"> -->
                                        <!-- <apex:outputText value="{!location + ';<br>'}" escape="false"/> -->
                                        <apex:outputText value="{!location.sitePhysicalAddress}" escape="false"/>
                                    <!--/apex:repeat-->
                                </div>
                            </div>
                        </td>
                    </tr>
                    
                    <tr>
                        <td><div class="service-field">Site Distance: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div>
                                    <!--apex:repeat value="{!service.All_Service_s_Sites__r}" var="location"-->
                                    <!-- <apex:repeat value="{!sitesList}" var="location"> -->
                                        <!-- <apex:outputText value="{!location + ';<br>'}" escape="false"/> -->
                                        <apex:outputText value="{!location.distance}" escape="false"/> miles
                                    <!--/apex:repeat-->
                                </div>
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td><div class="service-field">211colorado.org Link: </div></td>
                        <td colspan="4" style="padding: 5px;">
                            <div>
                                <div>
                                    <!--apex:repeat value="{!service.All_Service_s_Sites__r}" var="location"-->
                                    <!-- <apex:repeat value="{!sitesList}" var="location"> -->
                                        <!-- <apex:outputText value="{!location + ';<br>'}" escape="false"/> -->
                                        <apex:outputText value="{!location.friendlyURLName}" escape="false"/>
                                    <!--/apex:repeat-->
                                </div>
                            </div>
                        </td>
                    </tr>
                  
                </table>
                </apex:repeat>
            </apex:repeat>
        </div>
    </body>
</apex:page>
What is a method for adding content to Salesforce CRM content? (2 answers)
a.            Attachments
b.            Chatter files
c.             Libraries
d.            Documents