Usage of ASPOSE.BAR and Word using .NET Standard 2.0

I am building a library in .NET Standard 2.0 and trying to add a bar code to a word document, but I have compile error as InsertImage expects a SkiaBitmap while GenerateBarCodeImage returns a Bitmapt
DocumentBuilder builder = …

        builder.MoveToMergeField(args.FieldName);
        builder.InsertImage(builderBr.GenerateBarCodeImage());

@yalexopoulos,

Aspose.BarCode uses Aspose.Drawing.Common internally as graphic library for .NET core/standard framework. Anyways, we can look into it. Could you please also share a sample VS.NET project to evaluate your issue.

PS. please zip the project prior attaching.

  1. Save Aspose.Drawing.Bitmap to memory stream
  2. Create SkiaBitmap from memory stream

We are discussing about replacing System.Drawing.Common, Skia and other graphic libraries to Aspose.Drawing.Common in all of Aspose products.

Can you please provide with sample code as I cannot find a way. Please remember it has to be combatible with ASPOSE.Word

Thank you

1 Like