Developed a PoC in .Net Core using Aspose to generate reports, main targets:
to check the ease of implementation with minimum number of assemblies (as will port to Linux servers, and will have interaction with a mix of technologies as PostGres, PHP)
to check the quality of the image from the report;
get to know the best way to add the image into report
Tried in 2 ways so far:
using Reporting template:
var pic = new MemoryStream(File.ReadAllBytes(@“C:\Temp\print1.png”));
using DocumentBuilder instance , and built in method:
builder.InsertImage(@“C:\Temp\print1.png”);
On both scenarios throw exception → missing assembly SkiaSharp.
Would appreciate if can also show us with example (feed image file, template) how to add image using expressions. We observed can be achieved using 4 types, know how to try the first 3 (strream, byte[], object) but also interested on the last → A string containing an image URI, path.
If you add reference to SkiaSharp.NativeAssets.Linux, you should also install libfontconfig1 in your system. SkiaSharp.NativeAssets.Linux depends on this library. You can use the following command to install it:
If you do not have rights to install packages, or other reasons not to install libfontconfig1, you can simply use SkiaSharp.NativeAssets.Linux.NoDependencies, which does not require installation of libfontconfig1.