updated pdf table writing