Visualforce を使用することで PDF ドキュメント (<apex:page RenderAs="PDF">)を作成することができます。しかし、それらのファイルは CSS によって簡単に細工することができることをご存知でしょうか。
例えば、ページを分割したドキュメントを作ることができます。フッターおよびヘッダーを設定することができます。ページサイズを設定することができます。ページ番号を追加することができます。
注:実現したいレイアウトによっては、必要に応じて apex:page の各オプション(applyBodyTag など)を変更する必要があります。
<apex:page renderAs="pdf" showHeader="false" sidebar="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false">
<html>
<head>
<style>
@page {
size: letter;
margin: 25mm;
@top-center {
content: "Sample";
}
@bottom-center {
content: "Page " counter(page) " of " counter(pages);
}
}
.page-break {
display:block;
page-break-after:always;
}
body {
font-family: Arial Unicode MS;
}
</style>
</head>
<body>
<div class="page-break">Page A</div>
<div class="page-break">Page B</div>
<div>Page C</div>
</body>
</html>
</apex:page>
000385121

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.