small fixes around pdf version generation