Thanks, @appleianer. It works with text, but does not work with pictures/screenshots. I don't know how to make change to it, as I have very little script knowledge.
I have successfully twisted the AppleScript to make it work with pictures/screenshots in the System Clipboard as well.
It pastes whatever is in the System Clipboard to the newly created document.
tell application "TextEdit"
make new document at the front
tell application "System Events" to keystroke "v" using command down
print front document without print dialog
delay 1 --added a delay to watch the process
close front document without saving
I am glad @martin that you have found a solution. If you still want to make changes to the image to be printed, try this macro. In case you want to print an image in black and white and not in color the other way round: