I had a look at coders/pdf.c, and it appears the calculation for MediaBox and CropBox are correct. However, the values are still not what they should be. That means the values used in the calculation must not be correct.
% convert -version
Version: ImageMagick 6.5.1-0 2009-04-03 Q8
http://www.imagemagick.org
% identify -verbose test.jpg
Image: test.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Class: DirectClass
Geometry: 5000x4000+0+0
Resolution: 125x125
Print size: 40x32
Units: PixelsPerInch
% convert test.jpg test.pdf
% identify -verbose test.pdf
Image: test.pdf
Format: PDF (Portable Document Format)
Class: DirectClass
Geometry: 5000x4000+0+0
Resolution: 72x72
Print size: 69.4444x55.5556
in the pdf, we have:
/MediaBox [0 0 5000 4000]
/CropBox [0 0 5000 4000]
According to the code in coders/pdf.c, these should be:
/MediaBox [0 0 2880 2304]
/CropBox [0 0 2880 2304]
which would cause identify to output:
Geometry: 2880x2304+0+0
Print size: 40x32
Resolution: 72x72
This would seem to indicate that in coders/pdf.c:1241, either media_info or resolution has incorrect values. However, debugging those is a bit more than I can do at the moment.
I can provide the test.jpg used to convert to pdf if desired.
Jim