complete pdf generation