3

I am generating some PDF's and I would like to disable the header on the frontpage. I know there are built-in templates in rst2pdf and one template is called coverPage but I don't seem to be able to get it to work.

The manual is saying you should use a

..raw:: pdf  
  PageBreak coverPage

statement but that will insert a empty before the coverpage, so how can I have a coverpage without a header and without using the oddeven directive (I want to use the same header on all remaining pages).

Thanks for your suggestions!

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
DrDee
  • 3,549
  • 6
  • 30
  • 37

2 Answers2

2

That's how you change the stylesheet after the cover page. You'll need to create a custom stylesheet that specifies what is the format of the first page and then change the style for the rest of document. Have a look at chapter 15 of the manual.

Joakim
  • 11,468
  • 9
  • 44
  • 50
Matti Pastell
  • 9,135
  • 3
  • 37
  • 44
1

Note: current accepted answer contains broken link (linked website has gone).

The correct answer is simple:

1) In you style-file define:

pageSetup:
  firstTemplate: coverPage

2) Then in your template, when you want to start using header/footer add:

..raw:: pdf
  PageBreak cutePage

Make sure cutePage has set header/footer to true.

0leg
  • 13,464
  • 16
  • 70
  • 94