bug320 fixed some pdf output problems