How can I get same result every time I convert a single PDF to DOC file?

Let’s say I have simple PDF https://docs.aspose.com/cells/java/customize-globalization-settings-for-pivot-table/40468490.pdf
And I want to save it to as .doc file.
I use Aspose Pdf 21.12 for Java with Total license.
The code is simple:

com.aspose.pdf.Document pdfDoc = new Document(new FileInputStream("../samples/40468490.pdf"));
pdfDoc.save("../samples/output/result.doc", SaveFormat.Doc);

I run the code 2 times and expect resulting files to be the same. But they are not!
In fact, they differ a lot. Not just timestamps, but some big binary blocks differ (see screenshot). There are several different blocks like this.
Screenshot from 2024-04-04 13-37-25.png (209.1 KB)

Also, converting to .docx format has same effect: every attempt results output file with different content.

Why is that? How can I get identical .doc files from original file? Or maybe I can get files with only different timestamps, not whole lot of binary data?

@whitebearspirit

Can you please try using 24.3 version of the API and share the results with us that you got? Also, please share how you are checking binaries of the generated .doc at your end?

Same result for version 24.3. Big differences in files.

About checking binaries: some text editors, like VS Code, have diff mode and agree to open binary files ‘as is they were text’. That results showing some nonsense, but comparison still works and shows that nonsense in different between files. (screenshot in first post)

Also you can use special hex editors with diff mode, like dhex (for linux, see screenshot).
image.png (487.9 KB)

Or you can do that with console tools like diff -y <(xxd foo1.bin) <(xxd foo2.bin) or colordiff.

@whitebearspirit

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43779

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.