0

I am trying to apply CSS on Visualforce page which will work RenderAs PDF .I am applying CSS using Static Resource .So help me in resolving this problem

VisualForce Page

<apex:page standardController="fintechLLC__Loan__c" sidebar="false" showHeader="false" applyHtmlTag="true" applyBodyTag="false" standardStylesheets="false">

<apex:stylesheet value="{!URLFOR($Resource.main,'main.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.responsive,'responsive.css')}" />
<apex:stylesheet value="{!URLFOR($Resource.pricerange,'priceRange.css')}" />
<apex:stylesheet value="{!URLFOR($Resource.prettyPhoto,'prettyPhoto.css')}" />
<apex:stylesheet value="{!URLFOR($Resource.fontawesome,'fontAwesome.min.css')}" />
<apex:stylesheet value="{!URLFOR($Resource.animate,'animate.css')}" />
<apex:stylesheet value="{!$Resource.bootstrap}" />
<html>
<head>
    <title></title>
<style>
.container-col{
  width:70% !important;
  background: transparent url no-repeat scroll 0 0;
  background-position-x: 50%;
  background-position-y: 50%;
  background-size: 50%;
}



</style>

</head><!--/head-->


<div id="Main-Container">
    <!-- First page -->
    <div id="First-section" class="top-margin">
    <header id="header">
        <!--header-->
        <div class="header-middle">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="col-sm-3"></div>
                        <div class="logo col-sm-6" align="center">
                        <!--
                            <a href="#"><img src="images/logo.png" alt="" class="logo" width="235px" /></a> -->
                            <h3><b>Receivables Purchase Agreement<br/>
                            And Cognovit Note
                            </b></h3>
                        </div>
                        <div class="col-sm-3"></div>
                    </div>
                </div>
            </div>
        </div>

      </header>
      <br /><br />
        <div class="container container-col">
            <table width="100%" border="1" class="tbl">
                <tr>
                    <td>Agreement #:</td>
                    <td>Date: </td>
                </tr>
                <tr>
                    <td colspan="2">Seller (Legal and DBA): .</td>

                </tr>
                <tr>
                    <td>Address: </td>
                    <td>City/State/Zip: </td>
                </tr>
                <tr>
                    <td>Business Phone:</td>
                    <td>Cell Phone:</td>
                </tr>
                <tr>
                    <td>
                        Email Address: <br />

                    </td>
                    <td>Web Site (URL): </td>
                </tr>
                <tr>
                    <td colspan="2">Federal Tax ID Number: </td>

                </tr>
                <tr>
                    <td colspan="2">Name of Primary Authorized Signor:</td>
                </tr>
                <tr>
                    <td colspan="2">Name of Signor #2:</td>
                </tr>
                <tr>
                    <td>
                        Purchaser:<br />

                    </td>
                    <td>
                        Servicer:<br />

                    </td>
                </tr>
                <tr>
                    <td>Purchase Price:</td>
                    <td>Percent of Future Receivables Purchased: 15%</td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table width="100%" border="1">
                            <tr>
                                <td>Origination Fee: $</td>
                                <td>Setup Fee: $50</td>
                                <td>ACH Service (Daily): $5</td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        Purchased Amount:
                    </td>
                </tr>

            </table>
       <div class="col-sm-12" align="center">
                <p >
                    <b><u>WARNING -- BY SIGNING THIS PAPER YOU GIVE UP YOUR RIGHT TO NOTICE AND COURT TRIAL. IF YOU DO NOT PAY ON TIME A COURT JUDGMENT MAY BE TAKEN AGAINST YOU WITHOUT YOUR PRIOR KNOWLEDGE AND THE POWERS OF A COURT CAN BE USED TO COLLECT FROM YOU REGARDLESS OF ANY CLAIMS YOU MAY HAVE AGAINST THE CREDITOR WHETHER FOR RETURNED GOODS, FAULTY GOODS, FAILURE ON HIS PART TO COMPLY WITH THE AGREEMENT, OR ANY OTHER CAUSE.</u></b>
                </p>
            </div>
            <table width="100%" border="1" class="tbl1">
                <tr>
                    <td colspan="2" align="center">Payment Schedule</td>
                </tr>

                <tr>
                    <td colspan="2" align="center">
                        <table class="tbl11" width="100%" border="1">
                            <tr>
                                <td style="width:43%"> Daily Payment Amount (Weekday): </td>
                                <td style="width:10%"> $</td>
                                <td style="width:42%"> Number of Payments: </td>
                                <td style="width:5%"> </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        Signature: __________________________Print:______________________________
                    </td>
                </tr>

            </table>
            <br />
            <!--
            <div class="col-sm-12" align="center" style="color:#ccc">
                <p>
                    100 E.  Broad   St. Floor   16      |       Columbus,   OH      43215   |   877.844.5187

                    www.sbooa.com<span style="float:right">1</span><br />

                    <span style="float:right">Initials:__________</span>
                </p>
            </div> -->
        </div>
   </div>

    <div id="Second-section" class="top-margin">
    <header id="header">
        <!--header-->
        <div class="header-middle">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="col-sm-3"></div>
                        <!--
                        <div class="logo col-sm-6" align="center">
                            <a href="#"><img src="images/logo.png" alt="" class="logo" width="235px" /></a>

                        </div>-->
                        <div class="col-sm-3"></div>
                    </div>
                </div>
            </div>
        </div>
    </header><!--/header-->

    <br /><br />
        <div class="container container-col">
            <div class="col-sm-12">

               <b> Authorization Agreement for Direct Deposits (ACH Credit) and Direct Payments (ACH Debit)</b><br/>
<br/>
                <b>This Authorization Agreement for Direct Deposit (ACH Credit) and Direct Payments (ACH Debits) is part of (and incorporated by reference into) the Receivables Purchase Agreement and Cognovit Note.</b><br/>
<br/>
                <b>
               DISBURSEMENT OF PURCHASED PROCEEDS.</b> By signing below, Seller 

               authorizes SBOOA FUND, LLC, (and/or its successors and assigns) (“Purchaser” 

               or “Creditor”) or its designee to disburse the purchase proceeds by initiating an 

               ACH credit to the checking account indicated below (or a substitute checking 

               account Seller later identifies and is acceptable to Purchaser) (hereinafter referred 

                to as the “Designated Checking Account”) in the disbursal amount set forth in the 

                accompanying Receivables Purchase Agreement. This authorization is to remain 

                in full force and effect until Purchaser has received written notification from Seller 

                of its termination in such time and in such manner as to afford Purchaser and 

                Seller’s depository bank a reasonable opportunity to act on it.<br/><br/>

                <b>AUTOMATIC PAYMENT PLAN.</b> Enrollment in Purchaser’s Automatic 

                Payment Plan is required for purchase approval. By signing below, Seller agrees to 

                enroll in this Automatic Payment Plan and authorizes Purchaser or its designee to 

                collect payments required under the terms of Seller’s Receivables Purchase 

                Agreement by initiating ACH debit entries to the Designated Checking Account.   

                Seller authorizes Purchaser or its designee to increase the amount of any scheduled 

                ACH debit entry or assess multiple ACH debits for the amount of any previously 

                scheduled payment(s) that was not paid as provided in the payment schedule and 

                any unpaid Fees. This authorization is to remain in full force and effect until 

                Purchaser or its designee has received written notification from Seller of its 

                termination in such time and in such manner as to afford Purchaser and Seller’s 

                depository bank a reasonable opportunity to act on it. Purchaser or its designee

                may suspend or terminate Seller’s enrollment in the Automatic Payment Plan 

                immediately if Seller fails to keep Seller’s designated checking account in good

                standing or if there are insufficient funds in Seller’s checking account to process 

                any payment.<b> If Seller revokes the authorization or Purchaser suspends or 

                terminates Seller’s enrollment in the Automatic Payment Plan, Seller still will 

                be responsible for making timely payments pursuant to the alternative 

               payment methods described in the Receivables Purchase Agreement and 

               Cognovit Note.</b><br/><br/>

                <b> BUSINESS PURPOSE ACCOUNT. By signing below, Seller attests that the</b><br/><br/>
            </div>
            <br />
       </div>
 </div>
    <div id="Second-section" class="top-margin">
    <header id="header">
        <!--header-->
        <div class="header-middle">
            <div class="container">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="col-sm-3"></div>
                        <!--
                        <div class="logo col-sm-6" align="center">
                            <a href="#"><img src="images/logo.png" alt="" class="logo" width="235px" /></a>

                        </div>-->
                        <div class="col-sm-3"></div>
                    </div>
                </div>
            </div>
        </div>
    </header><!--/header-->

    <div class="container container-col">
                <div class="col-sm-12">

                    Designated Checking Account was established for business purposes and not 

                    primarily for personal, family or household purposes.<br /><br />

                    <b>ACCOUNT CHANGES.</b> Seller agrees to notify Purchaser, and its Servicing 

                    Agent, promptly if there are any changes to the account and routing numbers of 

                    the Designated Checking Account. Seller also authorizes Purchaser to collect 

                    funds from any and all bank accounts associated with Seller if Primary account is 

                    in default including accounts not listed below, but obtained by Purchaser.<br /><br />

                    <b>MISCELLANEOUS.</b> Purchaser is not responsible for any fees charged by 

                    Seller’s bank as the result of credits or debits initiated under this agreement. The 

                    origination of ACH transactions to Seller’s account must comply with the 

                    provisions of U.S. law.<br /><br /><br />

                    Depository Name: _____________________<br />
                    <br />
                    Branch:  ______________________________<br />
                    <br />
                    City: ____________________ State:___________ Zip:____________<br />
                    <br />
                    Routing Number: ________________________________<br />
                    <br />
                    Account Number: ________________________________<br />
                    <br />
                    Business Name: __________________________________<br />
                    <br />
                    Fed Tax ID#: ____________________________________<br />
                    <br />
                    Merchant Processor: ________________________________<br />
                    <br />
                    Merchant Account Name: __________________________<br />
                    <br />
                    Merchant Account Number: _________________________<br />
                    <br /><br/>
                    Signature: _____________________________Name: ______________________<br />
                    <br />
                    Title: ________________________________<br />
                    <br />
                    Date: _________________________________<br /><br />
        </div>

            <br />
         </div>
  </div>
 </div>
</html>
</apex:page>
1
  • 1
    There are a lot of problems with applying CSS from external file into PDF. Part of them are working only as inline one, part of them are not working at all. Move your apex:stylesheet inside head tag, and then everything, that hasnt applied move into inline css :(
    – kurunve
    Mar 7 '16 at 10:48
1

As you included some responive styles as bootstrap, some of them required to us JS. But VisualForce rendered as PDF do not executes JS and tags html, head and body are not used inside of apex:page tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.