I'll try my best to explain this correctly... I apologize in advance, I'm a geographer that's learned to write some code, not a CS guy.
From the link Patrick posted above, we got the Python script that ESRI staff developed for doing a print with Arcpy.mapping. The python script gets published in ArcServer as a geoprocessing service. I'm sure you know all this already, but I'm starting from the beginning. This geoprocessing service accepts a series of parameters that are passed to it, and then passes these parameters into a template (or multiple templates) that you have created, and are waiting for it to consume. In fact, which template the GP service will use is one of the parameters. We edited the python script a bit for our needs, but it works right out of the box.
The way our application works step by step is as follows:
User opens the application and selects what they want to print. They use combo boxes or text input boxes (depending which layer they're focusing on) to run a query task that zooms to the feature they want on their map. Once the query is complete and the feature they want to print is on their screen, they select which template they want to use from a separate combo box (for example, we have a map with map elements such as scale bar, locator map, etc, and a plain map without them.)
After they have everything selected, they press a button called "Export PDF" which is tied to an event handler that does the following:
Sets the PDFTitle variable based on the feature that the query returned (in our app, they do not create their own title, but this is an easy change).
Sets the Mapscale variable based on a map scale equation we use to make the features fit perfectly into the data frame.
Sets theTemplate variable based on which template they have selected from the combobox.
Passes these variables, and all the other arguments they require, to the parameters.
Creates the Geoprocessor ExportTask.
Executes the ExportTask.SubmitJobAsync
Then under the ExportTask.JobCompleted event handler, we:
Set our image.visibility = Visibility.Visible (the little PDF image they click to get their map)
Set our pdfURL = the url of the PDF that was created (you can change the output location in the python script)
Then we have a PDF image mouseleftbuttondown event handler, and when clicked we:
HtmlPage.Window.Invoke("PDFs", pdfURL);
And the map that was created is opened in a browser window and can be saved, printed, etc.
Phew. I hope that helped in some way, like I said if you need more code samples I'll look into getting those available.