No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
PDF 形式での Visualforce ページの表示
ページのダウンロードや印刷ができるように、PDF 形式で Visualforce ページを表示します。これを行うには、<apex:page> タグで renderAs="pdf" を設定します。
<apex:page> タグを変更するだけで、ページを PDF 形式に変換できます。
PDF として表示された Visualforce ページは、ブラウザ設定に応じて、ブラウザに表示されるか PDF ファイルとしてダウンロードされます。
1<apex:page renderAs="pdf">いくつかの取引先の詳細を PDF として表示するページの簡単な例を次に示します。
1<apex:page standardController="Account" renderAs="pdf">
2
3<apex:stylesheet value="{!URLFOR($Resource.Styles,'pdf.css')}"/>
4
5<h1>Welcome to Universal Samples!</h1>
6
7<p>Thank you, <b><apex:outputText value=" {!Account.Name}"/></b>, for
8 becoming a new account with Universal Samples.</p>
9
10<p>Your account details are:</p>
11
12<table>
13<tr><th>Account Name</th>
14 <td><apex:outputText value="{!Account.Name}"/></td>
15 </tr>
16<tr><th>Account Rep</th>
17 <td><apex:outputText value="{!Account.Owner.Name}"/></td>
18 </tr>
19<tr><th>Customer Since</th>
20 <td><apex:outputText value="{0,date,long}">
21 <apex:param value="{!Account.CreatedDate}"/>
22 </apex:outputText></td>
23 </tr>
24</table>
25
26</apex:page>PDF として表示された Visualforce ページ