@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.