allow choose format of the output (default="pdf")