Thank you very much for considering Aspose.
I would like to share with you that PdfExtractor allows you to extract the text in raw format, and you can’t retain the text formatting in the extracted text. However, we have already logged a new feature request as PDFKITJAVA-10540 to extract text while retaining the text order and formatting to some extent. You’ll be updated via this forum thread once it is supported.
Moreover, if you think that your requirement or issue is different then please share a sample PDF and elaborate your requirement a little bit, so we’ll be able to help you out.
If you have any further questions, please do let us know.
We’re sorry for the inconvenience.
Can you please share a sample PDF file, so we would be able to check your particular scenario?
We’re looking forward to help you out.