Publisher and Web Interface > Publisher > Generating documents and Publisher HTML > Worked example: generating a document through a document template (Publisher)
  
Worked example: generating a document through a document template (Publisher)
This is one of two worked examples that relate to generating documents and Publisher HTML:
Worked example: generating a document through a document template
Worked example: generating Publisher HTML through a document definition
This worked example demonstrates how to use Publisher to generate a document using a provided PTC Document Template.
Important: You can generate a document using a Document Template or a Document Definition. PTC Document Templates are provided with Publisher (available in the New Document pane), but no Document Definitions are installed with Publisher. You can create your own Document Templates and Document Definitions.
By default, Publisher works with the active model in Modeler, so we start by opening the model we want to work with in Modeler. We open the Traffic Lights model from the provided Examples database.
We now start Publisher through the Publisher command on the Tools menu in Modeler.
In Publisher, the New Document pane in the top left corner lists the Document Templates that are provided by PTC.
A Document Template defines which items and diagrams are included in the generated document and how that information is organized. Publisher is installed with a number of Document Templates you can use.
We use the 'UML - All Diagrams Only' document template, which generates each diagram in the model. We right-click the 'UML - All Diagrams Only' document template, point to Generate To, and then click Word.
Note that if we had wanted to generate Publisher HTML, we would have clicked the Publisher HTML command.
Publisher generates the document and then opens that document in Microsoft Word.
Notice that the document includes images of the diagrams that are in the Traffic Lights model.
From Microsoft Word, we save the document using the required location and name.
In this worked example we have demonstrated how to generate a document using a provided document template.
Note that users can create their own Document Templates, which you can import to the New Documents pane in your Publisher.