I don't know, but you might be able to get somewhere with the ImageMagick suite of tools, and specifically
identify and
convert.
Online resources about these tools:
https://imagemagick.org/script/identify.php
https://imagemagick.org/script/convert.php
http://www.imagemagick.org/Usage/formats/#jpg
Try
identify --verbose on one file that works, and one that does not. The output is lengthy, so you may wish to redirect the output to files and compare them like I did here:
Code:
# image from an older camera
identify -verbose IMG_058.jpg > temp1
# image exported from gimp
identify -verbose AirCanada.jpg > temp2
diff temp1 temp2
Even the diff will be lengthy. Here is one difference, as an example:
Code:
< Interlace: None
---
> Interlace: JPEG
I have no idea whether your printer cares about interlace, but it sounds important.
The third link I listed above gives some clues about how to change the JPG format. Carrying my example a bit further, I will change the interlace mode of the newer file:
Code:
convert AirCanada.jpg -define jpeg:interlace=none AirCanada-no-interlace.jpg
and it's done. The image looks the same. The file size is slightly different.
If it's not interlace, it's something else. See what other differences there are.
And good luck!