The most common way in Universal Function – File Exporter (UFFE) to mark something as printed is with a SQL Query.. Like this (Sample assume UDF is called U_EXPORTED but fit to your own UDF):
In the UFFE you update it like this with SQL:
If you for some reason do not wish to use Update SQL to do this (Technically legal as it is UDF but a “gray” area) you can instead do it with C# and the SDK. The drawback of this approach is that it is slower but follow all official rules of the SDK
Attached document show you how