PDF reporting code tuning