2017-06-21 108 views
0

我使用ZXing.NET生成條形碼。我想生成一個沒有它下面的文本的圖像。我使用下面的代碼:如何刪除條形碼圖像下方的文字?

var content = "AAA"; 
var writer = new BarcodeWriter 
{ 
    Format = BarcodeFormat.CODE_39, 
    Options = new ZXing.Common.EncodingOptions 
    { 
     Height = 80, 
     Width = 100, 
     Margin = 1 
    } 
}; 
var bitmap = writer.Write(content); 
+0

https://stackoverflow.com/questions/2244225/remove-text-from-below-of-the-barcode-in-asp-netc – Valkyrie

回答

3

EncodingOptions具有PureBarcode爲布爾選項。將其設置爲true應該省略文本。您可以檢查所有選項in the source

+0

謝謝。它完美的作品。現在我遇到了條形碼的大小問題。看起來文字越長,條形碼的寬度就越長。似乎無法調整它。無論如何,感謝您的幫助。 – ThEpRoGrAmMiNgNoOb

相關問題