fixing generating pdf

fixing generating pdf