Export pdf file using a single line of code