.Net Barcode Text missing digits in some PC while OK in others

Hi,
I am experiencing a very strange issue. The last 4 barcode digits are missing from the barcode text if I run my application on two of my laptops, and it is all good on the other two PCs.
The issue only happens to the barcode display text while the barcode graphic is correct and can be correctly scanned.
The application is shared using Dropbox and I have double-checked that they are the same across these PCs.
The PCs with correct barcode text are also developing PC and have Visual Studio 2017/2019 installed. But I have tried to install the two IDEs on one laptop with the wrong barcode text, it still didn’t work.

The version I was using is ASPOSE.Barcode.21.7. Then I updated it to 21.10.0 and still not working.

Please check this screenshot for the comparison: 11.14.2021-19.32.48

Thanks!

Could you please zip and attach a standalone Visual Studio .NET sample application here to reproduce the issue on our end. Also give environment details of the PC where you find the issue. We will check your issue soon.

Could you try generate with:
BarcodeGenerator.Parameters.Barcode.CodeTextParameters.NoWrap = true;

This could be rendering error with different rendered string size measurement.

Thanks. I have tried to create a small app and re-produce the issue but couldn’t. Still don’t know what went wrong exactly.
I tried your option of NoWrap setting but not working. Problem still exists.
In my existing app, I saved the barcode as EMF to memory stream and use that to generate the full barcode content. That problem occurs in two of my laptops.
I tried to save the barcode as SVG and that problem of losing digits is gone and displays full content. But the layout changed a fair bit so I will have to adjust that. Don’t know why that format change eventually changed the layout and barcode size.
I tried to change my application targeting framework to 4.7.2 but still not working.
Will keep on trying and see what exactly went wrong.

And, do you have any preference for SVG and EMF? I want a clear print of the barcode content. JPG/PNG is definitely not good.

Thanks.

EMF generation with System.Drawing lib has some bugs (Microsoft fully correctly supports only EMF+, but EMF+ is not supported on many non MS systems). In next Aspose.Barcode version (I think in this .Net release) we implemented own EMF encoder.

Hi Alex,

Can you tell me the version number with your own EMF encoder? We are currently using 21.10.0.

As it has taken too much time, I almost gave up on that and switch to SVG as a workaround. The layout/size is tricky to deal with though. If the new Barcode release can fix the problem we have now, that would be better.

I checked the Windows system on the PCs. They are all running Windows 10.
The good ones: Windows 10 X64, 21H1
The bad one: Windows 10 X64, 20H1.

Don’t know if that would make any difference.

@chriscai,

We will get back to you soon to address your concerns.

It will be in 21.11. However we found there yet one bug it doesn’t wrap the text.

Thanks. I have switched to SVG which doesn’t have that issue. Will still keep the EMF way and will test it after the new release 21.11.

I can’t say it is caused by the EMF encoder. The root cause is not yet found. Will investigate this further once I got some free time.

@chriscai,

We will also keep you posted with latest updates (once available) on the bug that we found regarding incorrect text wrapping with current EMF encoder.