EDI: fix horizontal padding calculation