Skip to content

Print Content Processing (print)

The DataProxy print method is triggered during a print operation. It receives the model and the framework-generated HTML string, and returns the final HTML to render — useful for watermarks, headers/footers, or custom layout.

java
@Override
public String print(EruptTest model, String content) {
    // Append a watermark to the printed output
    return content + "<div style='color:#ccc;font-size:12px'>Printed by: " + getCurrentUser() + "</div>";
}

Contributors

The avatar of contributor named as YuePeng YuePeng
The avatar of contributor named as Claude Opus 5 (1M context) Claude Opus 5 (1M context)

Changelog

Released under the Apache-2.0 License.