Skip to main content

This is a HowTo.

I had a hard time adding a raster to an HTMLReportGenerator. Thanks to some remarks in an old Question of the Week I found a solution. Many thanks to ​@mark2atsafe!

I share my solution here for others that may encounter the same problem (and for myself, in case I encounter the problem once more in a few months 😉).

HTMLReportGenerator can't use a raster, but it can use an image. This image must be in binary encoding. The image can be embedded in the HTML, so it suffices to have a temporary image. The temporary image will be automaticaly removed when the workspace finishes.

So the process becomes:

  1. Use a TempPathnameCreator to provide a path for temporary storage of the image file
  2. Use a RasterExtractor to convert the raster to a blob
  3. Use an AttributeFileWriter to export the blob to a temporary file. Specify FME-binary Encoding
  4. In an HTMLReportGenerator embed the temporary file as an image

 

Be the first to reply!

Reply