This example shows you how to use Placeholder images in your template that will be replaced by a Base64 encoded image in your data.
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 Microsoft Word - use Bookmarks.
- To mark an image in LibreOffice Writer - use Picture>Names.
NOTE: The ZIP file contains an example Doc and Odt file which each have more detailed instructions depending on whether you are using Microsoft Word or LibreOffice Writer.
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.