Fixed issue #7712: Some problems with statistics in pdf format