Fix corrupt PDF from cores program