Tagliatti / NetBarcode

Barcode generation library written in C# and .NET Standard 2
MIT License
336 stars 68 forks source link

Error: method not found: SixLabors.Fonts.FontRectangle #46

Closed WBorgo9 closed 3 months ago

WBorgo9 commented 3 months ago

Hi

I'm using the following code in VS 2019: var barras = new Barcode( "12345678", NetBarcode.Type.EAN8); var image = barras.GetImage();

or var barras = new Barcode( "12345678", NetBarcode.Type.EAN8); barras.SaveImageFile(@"C:\Users\test\Downloads\teste_barras.jpeg", ImageFormat.Jpeg);

I got this error: System.MissingMethodException: 'method not found: 'SixLabors.Fonts.FontRectangle SixLabors.Fonts.TextMeasurer.Measure(System.String, SixLabors.Fonts.TextOptions)'.'

Can you help me, please?

Thanks

Tagliatti commented 3 months ago

Hello, what version of NetBarcode?

WBorgo9 commented 3 months ago

Version: 1.7.2

Tagliatti commented 3 months ago

I don't use dotnet directly on Windows, so I can't tell you how to install the dependencies, but the errors are related to the lack of libc6-dev and libgdiplus. Since version 1.5, the lib responsible for generating the image is ImageSharp. Maybe you can get more information on how to run it on Windows in the official repository https://github.com/SixLabors/ImageSharp

WBorgo9 commented 3 months ago

ok ... thank you very much