Basically, you can follow the Print page article from Dev.Guide. Regrettably, there is no method that returns whole content of page, but you can get content from all editable regions by calling GetEditableValue method manually for every editable region on the page:
<%# GetEditableValue("IdOfEditableRegion") %>
-md-