Please help! Printjob not printing jpgs

I am having an issue with the printjob class where it is not printing the jpgs on the screen. it prints everything else, just not the image. Also, it seems to be inconsistent in that I have gotten it to work, but the majority of times it doesn’t. Please tell me someone else has had this problem and knows how to fix it!