Open
Description
Hello, I tried to create a document (odt) with an embedded image. In the image, just replace the name with "$var". When you try to replace it with the context, the file is broken. How do I associate the image I want to replace with the context?
Using NuGet Version ( 2.1.1 )
System.IO.MemoryStream ms = new MemoryStream();
bmp.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
ms.GetBuffer();
Image im = new Image("png", ms.GetBuffer());
var renderContext = new Dictionary<string, object>()
{
{ "var", im },
}
OdfTemplate a = new OdfTemplate();
a.Load(path);
a.Compile();
IDocument b = a.Render(renderContext);
b.Save(@"C:\temp\simpleImageMap.ods");
Regargs
Metadata
Assignees
Labels
No labels
Activity