在Salesforce中以PDF的格式显示对应的页面

在Salesforce中可以简单设置page的属性让页面以pdf的方式显示内容, 当然了我们的page内容可以用Html的方式编写

设置方式为:renderAs="pdf"

请看如下简单的代码段:

<apex:page action="{!Init}" controller="MyPdfController" sidebar="false" showHeader="false" showChat="false" renderAs="pdf">
    // Your html......
</apex:page>

更多的关于page中其他的属性细节,请看如下链接:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_page.htm 

原文地址:https://www.cnblogs.com/mingmingruyuedlut/p/3438090.html