Export Grid to PDF with dynamic Settings?

Hi! how can I create a pdf with user supplied settings?
Settings like:
– orientation
– filename
– Dynamic Headers / Footers

thank you :slight_smile: