Advice:
Generating QR codes as jpg pictures is a bad idea.
jpeg is a lousy picture format, the picture loose information as the compression is done.
The problem is that some pixels that were black or white are changing of color, this make the QR code more difficult to read.
Second problem, the QR code is resized when printed, it makes quality even worse.
The options are:
jpg/jpeg: bitmap with lousy compression, probably worst choice.
png/gif: bitmap with lossless compression, a better choice.
svg: vector-based graphics, keep top quality when resized.
Scalable Vector Graphics - Wikipedia[
^]