support running without a csv file and fix bug when generating single page pdfs