@zwei Please note, Barcode image generation is our of Aspose.Words scope and is performed by Aspose.Barcode, or other barcode generation tool used in your implementation of IBarcodeGenerator. I have played with IBarcodeGenerator implemetation provided in the code examples and it looks like the problem is with barcode scaling. If add the following:
if (generator.getBarcodeType().equals(EncodeTypes.CODE_128)) {
final float CODE_128_SCALE = 0.25f;
generator.getParameters().getBarcode().getXDimension().setInches(generator.getParameters().getBarcode().getXDimension().getInches() * CODE_128_SCALE);
generator.getParameters().getBarcode().getBarHeight().setInches(generator.getParameters().getBarcode().getBarHeight().getInches() * CODE_128_SCALE);
}
Barcode looks a bit better, but still not the same as in MS Word: out.pdf (72.5 KB)
I would suggest you to consult with Aspose.Barcode team regarding the barcode scaling.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.