Latest fix from gospodinov/fixExtractPdf