原創(chuàng)|其它|編輯:郝浩|2012-11-08 11:28:27.000|閱讀 958 次
概述:在使用Aspose.BarCode時,可以使用非英語字符集生成2維碼,例如,土耳文、中文、阿拉伯語、拉丁文、希臘文等等。字符數(shù)的限制是1000。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
在使用Aspose.BarCode時,可以使用非英語字符集生成二維碼,例如,土耳文、中文、阿拉伯語、拉丁文、希臘文等等。字符數(shù)的限制是1000。下面是分別使用土耳其文和中文生成二維碼的實例:
使用土耳其字符創(chuàng)建一個Pdf417二維碼
C#
// Generate the barcode BarCodeBuilder builder = new BarCodeBuilder(); // Set symbology type builder.SymbologyType = Symbology.Pdf417; // Set the code text string codetext = "AY?E" + "\n" + "ümit" + "\n" + "ümit@estee.com" + "\n" + "Türkiye"; builder.CodeText = codetext; // Set the display text builder.DisplayText = codetext; builder.Save("c:\\barcode.png");
VB.NET
' Generate the barcode Dim builder As New BarCodeBuilder() ' Set symbology type builder.SymbologyType = Symbology.Pdf417 ' Set the code text Dim codetext As String = "AY?E" + vbLf + "ümit" + vbLf + "ümit@estee.com" + vbLf + "Türkiye" builder.CodeText = codetext ' Set the display text builder.DisplayText = codetext builder.Save("c:\\barcode.png")
使用漢語創(chuàng)建一個Pdf417二維碼
C#
// Generate the barcode BarCodeBuilder builder = new BarCodeBuilder(); // Set symbology type builder.SymbologyType = Symbology.Pdf417; // Set the code text string codetext = "被洪水困住的"; builder.CodeText = codetext; // Set the display text builder.DisplayText = codetext; builder.Save("c:\\barcode.png");
VB.NET
' Generate the barcode Dim builder As New BarCodeBuilder() ' Set symbology type builder.SymbologyType = Symbology.Pdf417 ' Set the code text Dim codetext As String = "被洪水困住的" builder.CodeText = codetext ' Set the display text builder.DisplayText = codetext builder.Save("c:\\barcode.png")
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)