Combine an image onto a PDF

I need to test out if this is even possible. Is it possible to add a raster image (jpg or png tiff) etc into/onto a PDF file, scale image to fix into a certain dimension, and save that as a new PDF file? I’d also need to add a line of text onto the PDF as well.

Not using InDesign, Photoshop, graphic converter etc. Only using image events, sips, unix shell scripts etc. The script can’t bring up another app or UI to interrupt the user.

Any ideas? All I’m looking for is some good pointers, not necessarily a whole script (but hey if you have something you can share that would be great).