modified pdf generation