We have tested the scenario using one of our sample files and were unable to notice any issue. For your kind reference, we have attached both input and output files.
ouput.zip (3.8 KB)
Sample PDF.pdf (1.9 KB)
Would you please try using a simple PDF file at your side having less than 4 pages and paragraphs because due to limitation of evaluation version, you can only process 4 elements of a PDF document. In case you still face any issue, please share sample file with us. We will test the scenario in our environment and address it accordingly.
PS: Please try your scenario using Aspose.PDF for Java 19.3.