Hello,
You shouldn't need a custom extra to make this function. You just need to add two blocks of code to your template.
In the header put the follow:
<script src="http://www.google.com/cloudprint/client/cpgadget.js">
</script>
<script defer="defer">
var gadget = new cloudprint.Gadget();
gadget.setPrintButton(cloudprint.Gadget.createDefaultPrintButton("print_button_container"));
gadget.setPrintDocument("url", "[document title]", "[document URL]");
</script>
Then anywhere you want a print button put:
<div id="print_ button_container"> </div>
Nothing special required.