fix pdf view calculation