Hello I have the below VF page which I use to generate a letter. I am not using "visualforce page that is rendered as PDF". I searched about "visualforce page that is rendered as PDF" but when I tried that out in my page it did not work.
<apex:page standardController="P__c" showHeader="false" extensions="Bclass">
<apex:form >
<apex:image url="{!imageURL}" style="width:720px" ></apex:image>
<apex:panelGrid columns="2" width="720px">
<apex:panelGrid columns="1" width="95%">
<span style="font-family: sans-serif; font-size:16px;"><b>DOB Job Number:</b> {!P__c.DOB__c}</span><br/>
space:nowrap;"><b>Premises:</b> {!P__c.address__c}</span>
</apex:panelGrid>
</apex:panelGrid>
<br></br>
<div id="container2" style="width:720px">
<apex:repeat value="{!objlist}" var="d">
<tr>
<td><apex:outputText value="{!d}" style="font-family: sans-serif; font-size:16px;" /></td><br></br>
</tr>
</apex:repeat>
</div>
<!-- Want to add this image footer in all pages -->
<apex:image url="{!image_footer_URL}" style="width:720px" ></apex:image>
<!-- Want to add this image footer in all pages -->
<apex:commandButton action="{!Savecopy}" disabled="false" value="Save"/>
</apex:form>
</apex:page>
Some of the online answers assumes that <apex:page renderAs="pdf"
is used in the VF page, but in my case I do not use this tag if you have noticed. I use the below code in my apex controller class to render a pdf version:
public PageReference Savecopy(){
PageReference p = Page.RSheet;
blob b = ApexPages.currentPage().getContentAsPDF ();
Attachment a = new Attachment();
a.body = b;
a.name = 'Sheet '+currentdate+'.pdf';
a.parentid = pID;
insert a;
PageReference pref = new PageReference('/'+pID);
return pref;
}
How can I make this move to footer area. I want to make this footer visible in all the pages that are generated.
The answers at at this link- https://help.salesforce.com/apex/HTViewSolution?id=000003705&language=en_US does not fit in with my case. I need to do a work around for this, Is it possible?