我正在使用 iTextSharp 创建代码 39。如何更改代码的大小?我只能更改代码的高度(通过 BarHeight 属性),但不能更改宽度。
我的代码:
Barcode39 code = new Barcode39();
code.Code = content;
code.Baseline = 20; // Doesn't affect rendering.
code.Size = 20; // Doesn't affect rendering.
code.BarHeight = 60; // DOES affect rendering.
Image img = code.CreateDrawingImage(Color.Black, Color.White);
我可以调整图像的大小,但我担心图像的分辨率会受到影响。
最佳答案
尝试更改各个栏的宽度:
Barcode39 bc39 = new Barcode39();
bc39.Code = "1234";
bc39.X = 2;
关于.net - 如何调整条码大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5620481/