How can I prevent screenshots of my file on Nextcloud when sharing it?
Your question is not clear for me.
Please explain in detail.
You cant prevent that. Imagine, how would you prevent, that someone is taking a photo of their monitor with their smartphone?! For screenshots apply the same rules
Additional they can also download it. Every HTTP-request is a download.
You need watermarking for all file types. Part you can find at Secure view - Prevent your shared files from getting downloaded - Nextcloud
Thank you so much