It should have been a comment, but since I got less reputation, I canβt comment, so I write here. I think you can run both pdfbox and fontbox as 2 streams (save time).
Save the data that you get to the Bean, and then use the Bean to get text and font information.
Your problem with getting a combined result can be solved.
source share