how to export dynamic images into pdf