using temporary file for output pdf