VisualforcePage中使用【<apex:page renderAs="pdf">】标签可以生成PDF文件。
1.VisualforcePage做成
getAccountListPdfForVf.page
<apex:page standardController="Account" recordSetVar="accounts" extensions="ListViewDownloadController" renderAs="pdf">
<h1>Welcome to VisualforcePage PDF Samples!</h1>
<table>
<apex:variable var="count" value="{!0}"/>
<apex:repeat value="{!accounts}" var="o">
<tr>
<td>
{!o.Name}
</td>
<td>
{!o.Id}
</td>
</tr>
<apex:variable var="count" value="{!count + 1}"/>
</apex:repeat>
Account List View Size is {!count}
</table>
</apex:page>
2.Listbutton做成
3.效果展示
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。