Images - Part One

Category : Technical Examples

This example shows you how to use Placeholder images in your template that will be replaced by a Base64 encoded image in your data.

Data Files
Output Files
All Files as a ZIP

This example explained

1) Static Images

    Any image in a template that isn't marked for replacement will appear in the final document.


2) Dynamic Images

    Instead of using the normal <<field>> notation, Docmosis looks for placeholder images in the template.

    The placeholder image needs to marked so that Docmosis know which images to replace.

  •     To mark an image using MS Word - use Bookmarks.
  •     To mark an image in OpenOffice or LibreOffice - use Picture>Names.

    In either case the Bookmark or Name should have the format: img_fieldName.

    The "img_" part is the instruction to Docmosis that this image should be replaced.

    The "fieldName" part identifies the data that will be used to create the image.

     In this example the new image has been Base64 encoded.

    By setting the properties of the placeholder image in the template, you can control how the image will layout in your final document.  For example: setting text wrapping.