Question

Add pictures to table in Word doc using Python docx in PythonCaller

  • 28 November 2022
  • 1 reply
  • 69 views

Badge +11

Recently I have been playing/fooling/struggling around with the creation and modification of Word documents using a combination of MSWordStylers and the Python docx library, called from a PythonCaller. A very instructive journey :-)

To make sure I don't forget immediately everything I've learned, I have decided to summarize my findings in a template. And because a lot of input has come from this community I will share the results here. Please see template attached: images-to-table-python-docx.fmwt

It starts by reading Parcel information from a database (gpkg) and it creates a summary table in a word document, including a little image with the parcel plotted on an aerial image.

Inspiration has been taken from these to discussions:

With some slight modifications I have integrated these two examples in my own workflow.

What do you think?

Cheers,

Egge-Jan


1 reply

Userlevel 6
Badge +31

Thanks for sharing. Personally, I don't like renaming transformers, as this makes it harder to review workspaces.

Reply