SYMPTOM
In certain cases, users might not have access to the out-of-the-box export button in the menu bar when the header bar is hidden or customized. Using URL API to export the current document might require many efforts when the document contains prompt, selectors, panel selectors, etc.
The approach described below allows you to trigger the out-of-the-box export action through a hyperlink.
ACTION
There are two ways to trigger the action.
Method 1:
<div onclick="mstrApp.docModel.controller.printPDF();" style="cursor: pointer;">Export PDF</div>
<div onclick="mstrApp.docModel.controller.exportExcel();" style="cursor: pointer;">Export Excel</div>
<div onclick="mstrApp.docModel.controller.exportHTML();" style="cursor: pointer;">Export HTML</div>
Method 2:

javascript:mstrApp.docModel.controller.printPDF();
javascript:mstrApp.docModel.controller.exportExcel();
javascript:mstrApp.docModel.controller.exportHTML();
--> Replace : with : such as

5. Uncheck "Open in new window"
Note:
From in-house testing for 10.4.x, it may be observed that using Method 2, the export works but the original document page is blocked by the loading icon as below, which could not be dismissed.

This behavior would not be observed for Strategy 2019 or above.
Any user who encounters this problem could use Method 1 instead.
KB442247