I'm trying to create a report based on a dotx template (word 365) using Report generator. I'm creating the template using the develepor tool in word.
However I'm not able to "print" a figure.
First i tried
Sample = figure('Name','Sample'); plot(0:10,0:10);
import mlreportgen.dom.*; import mlreportgen.report.*;
D = Document('FromTemplate','docx','template.dotx');
T = Text("This is Sample!");
T.Bold = true;
I'm able to convert the figure to a picture, but it doesn't scale itself to the template. This causes the image to be far larger than the page and impossible to integrate in report layout. See example below.
img = Image('Sample.jpg');
I'm properly using the wrong methods, but for some reason I havent been able to find anything of the subject online. Hopefully someone here can help.