patch tempfilename per pdf