MDL-42028 EditPDF: progressbar - return 500 error on exception when calculating number of generated pages