adde  new makepdf function