Principle

Sometimes combining documents using the book template is not enough. You may want to add a message or an image in a specific part of your generated documentation.

Modelio Document Publisher has a solution for this use case:

  • Add an additional note on the element you want, whose type will determine where it will be inserted in the generated document

  • Complete the note content with the file’s path

  • Add an «External Document» stereotype on the note

Inserting a document

Document Publisher relies on the document’s target format to handle the inserted file type. For example, you can insert a ".txt" file  in both HTML and OpenXML formats, but ".docx" files can be inserted only in OpenXML generation mode. According to your system configuration, you may have to actualize your document content (using F9 for Word and usually F5 for your web browser) before seeing the inserted files.

The image below shows how to insert an image in the documentation generated for a Use-Case.

Documentpublisher advanced inserting external documents external document
Inserting an image

When generating the document, the image is inserted at the same location as the current "description" note:

Documentpublisher advanced inserting external documents external document 2
The inserted image in the generated document

An «External Document» note can also be generated as a link, rather than a direct insertion.

Just check the "Is a link" property in the "Annotations" view, and add a label if you do not want the hyperlink to be explicit, as shown below:

Documentpublisher advanced inserting external documents external document 3
Switching to link insertion

When generating the document, the hyperlink is inserted instead of the image, and the label is displayed:

Documentpublisher advanced inserting external documents external document 4
The inserted link in the generated document