0

Recently my CSS to format a VisualForce Page renderes as PDF is not showing in landscape nor are page numbers showing. Both the preview from SalesForce and download show the PDF in prtrait with no page numbers. The CSS has not changed and is at the bottom of the CSS file. CSS is used as a static resource. Anyone know of recent changes that would impact this ?

    @page {
/* Landscape orientation */
size: ledger landscape;

/* Put page numbers in the top right corner of each
   page in the pdf document. */
@bottom-right {
 content: "Page " counter(page) "of " counter(pages);
}
   margin-top:3cm;
   margin-left:2.54cm;
   margin-right:2.54cm;
   margin-bottom:3cm;

   margin-top:1cm;
   margin-left:1cm;
   margin-right:1cm;
   margin-bottom:1cm;

}
2
  • I did this awhile back and the only difference I see in our code is div {} @bottom-right {.... the div
    – EricSSH
    Commented May 3, 2017 at 15:36
  • Weird. Even if I comment out my <apex:stylesheet value.... on the PDF rendered page and wrap the CSS in the <Head><Style> the PDF remains as a portrait with no page numbering. It's almost like the PDF integration with the page is not listening.
    – rickmac
    Commented May 3, 2017 at 16:52

1 Answer 1

1

This was caused by an upstream CSS button that did not have a closing } .

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .