function to create PDF version of hydrograph