In HtmlFormEntryUI, the Print Button functionality is currently hardcoded to use the browser print dialog (https://github.com/openmrs/openmrs-module-htmlformentryui/blob/c008d80ca04435d40d4d5abe59f3cd78a19b7801/omod/src/main/webapp/pages/htmlform/viewEncounterWithHtmlForm.gsp#L39).
It would be useful to allow supporting setting an alternative URL in the href by creating an ui.pageLink() and adding a link target attribute, from the gsp model, allowing other modules to provide another method of printing if needed.
One of the bigger questions that arises is how should that data be passed from another module to the ViewEncounter (https://github.com/openmrs/openmrs-module-htmlformentryui/blob/c008d80ca04435d40d4d5abe59f3cd78a19b7801/omod/src/main/java/org/openmrs/module/htmlformentryui/page/controller/htmlform/ViewEncounterWithHtmlFormPageController.java#L17-L49) controller?
Does this approach sound reasonable and would a Global Property or two be acceptable for this purpose?