In some files, white spaces are not defined as a character but as a distance between words. This distance is known with TextPosition.getWidthOfSpace() or TextPosition.getWidth(). In my case, WidthOfSpace was 0 and Width was Float.NaN, so extracted text contained no spaces. I just added a check on the value of this distance and a default value (1f) to avoid this behaviour.
I didn't do much tests so it may break other things but for my purpose it is OK.