Here is the code for an export_html button.
<?php
function _tpl_button_print() {
global $ID;
$action = DOKU_BASE . 'doku.php';
$button = <<<BUTTON
<form class="button" method="get" action="$action"><div class="no">
<input type="hidden" name="do" value="export_html" />
<input type="hidden" name="id" value="$ID" />
<input type="submit" value="Print" class="button" title="Print View" /></div>
</form>
BUTTON;
echo $button;
}
?>
You can include it at the top of main.php as you would any other included file and then access the button from
<?php _tpl_button_print() ?>
You can also adapt it for other exports using conditionals or a case statement.