Thanks, I understand.
The only way I know to do this is by scripting with loops. Create a list of all the jpg file sizes, then add them up until you reach 24MB and convert just those jpgs to a pdf. Repeat with the remaining jpgs for the next pdf file.
Suppose I add up the file sizes of 001.jpg 002.jpg 003.jpg and find it is under 24MB. But if I try to include 004.jpg, I find it is over 24MB. Then I would just do
convert 001.jpg 002.jpg 003.jpg -density xx 001.pdf
Then start adding from 004.jpg 005.jpg etc until you reach the next 24MB. The do the same command with these images and write to 002.pdf.
To find the image file sizes, you can use
convert 001.jpg -format "%b" info:
see
http://www.imagemagick.org/script/escape.php
you can get a list of all the file sizes by doing the following (in unix)
list=`convert *.jpg -format "%b" info:`
provided you just have only the jpgs you want to use in one directory. Or possibly use %03d.jpg in place of *.jpg