<style type="text/css">
@page
{
/* Landscape orientation */
size:landscape;
/* Put page numbers in the bottom right corner of each
page in the pdf document. */
@bottom-right {
content: "Page " counter(page);
}
}
</style>
<style type="text/css">
@page
{
/* Landscape orientation */
size:landscape;
/* Put page numbers in the bottom right corner of each
page in the pdf document. */
@bottom-right {
content: "Page " counter(page);
}
}
</style>
こんにちわ。
他の方と同様で私もCSSで実現しています。
参考にした記事から抜粋してみました。
<style type="text/css"> @page { /* Landscape orientation */ size:landscape; /* Put page numbers in the bottom right corner of each page in the pdf document. */ @bottom-right { content: "Page " counter(page); } } </style>
http://community.salesforce.com/sforce/board/message?message.uid=161817
ご参考までに。
All Answers
スタイルシートで
@page {
size: 29.7cm 21.0cm;
margin-top: 1.0cm;
margin-left: 1.0cm;
margin-right: 1.0cm;
margin-bottom: 1.0cm;
}
としたら、横向きになるかもしれないです。
いちいち記載するのが面倒だと、
CSSファイル(pdf_style.css)を作成して、
そのCSSファイルを静的リソースにUP(pdf_styleというZIPにしたとします)します。
VisualForce側では、
<apex:stylesheet value="{!URLFOR($Resource.pdf_style, 'pdf_style.css')}"/>
というかんじで読み込むといいかもしれないです。
私は、ここの内容 とかここの内容 を参考にしています。
こんにちわ。
他の方と同様で私もCSSで実現しています。
参考にした記事から抜粋してみました。
<style type="text/css"> @page { /* Landscape orientation */ size:landscape; /* Put page numbers in the bottom right corner of each page in the pdf document. */ @bottom-right { content: "Page " counter(page); } } </style>
http://community.salesforce.com/sforce/board/message?message.uid=161817
ご参考までに。
nabemaru さん
tima さん
両者の方法、どちらでもとてもすばらしいです!!
横向きに表示することができました。
tima さんの方は、フッターにページ数も表示できるのですね!すごいです!
他にも総ページ等、色々でるんですかね~
とりあえす、助かりました! ありがとうございました!!