script to generate pdf with pandoc