Insert Image Files into a Template
HotDocs supports referencing graphics with an INSERT instruction in a text template in Microsoft Word only. If you reference a graphic in a WordPerfect template, HotDocs ignores the INSERT instruction.
Using a HotDocs INSERT instruction , you can insert image files into a template. HotDocs supports inserting the following image file formats:
- JPG
- PNG
- GIF
Just as with text files, the insert instruction acts as a pointer or reference to the image files. HotDocs does not insert the actual image until it assembles the document. This feature can be very useful if, when you design the template, it is not possible to determine which particular diagrams, photos, or other graphics files the user needs to specify at document assembly .
For example, say you are a legal secretary drafting a letter to be sent to a client, and any one of several attorneys can sign the letter. Rather than use Word to add or remove signatures once you assemble the document, you can instead include a series of INSERT IMAGE instructions that define the conditions for which signature gets inserted, as in the following:
«IF Attorney Name = "Cathy Bailey"»
«INSERT "cbailey sig.png" IMAGE»
«ELSE IF Attorney Name = "Jim Johnson"»
«INSERT "jjohnson sig.png" IMAGE»
«END IF»
At document assembly, HotDocs inserts the correct signature based on how you answer the Attorney Name question.
When you insert a graphic into a template, following the INSERT instruction and the name of the file, you need to type the IMAGE keyword. This keyword instructs HotDocs that the file that should be inserted is a graphic.
Although you can insert templates or graphics from any location, file names for inserted templates or graphics should be unique if you plan to publish templates for use on HotDocs Server or Cloud Services .
Insert an Image File Located in the Same Template
If you want to insert a graphic already in use in the template, you can do so. HotDocs removes the image from the template, copies it to a DOCX document, and inserts the INSERT Image instruction. An advantage to doing this (rather than inserting the graphic directly) is that you can format the graphic properties within that DOCX template, and have those settings apply to the graphic at the point of insertion. For example, if you want to specify placement, text wrapping, borders, and other effects, you can assign them in the DOCX document, then, when you insert the image, those properties apply at the parent template. If you need to reuse the graphic in other templates, or in other places in the same template, setting these properties on the image in it's DOCX container can save you a lot time.