That is possible with the last solution I proposed. You hit the button, then image creation is made behind the scene and then you call for printing as described in the link.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: