17,740
社区成员
发帖
与我相关
我的任务
分享
// Create instance of BarCodeBuilder class
BarCodeBuilder builder = new BarCodeBuilder("1234567890", Symbology.Pdf417);
// Set Aspect Ratio to 3:2 or 1.5
builder.AspectRatio = 1.5f;
// Save the barcode image to disk in PNG format
builder.Save("barcode.png");
Aspose.BarCode.BarCodeBuilder b;
b = new Aspose.BarCode.BarCodeBuilder();
b.SymbologyType = Aspose.BarCode.Symbology.DataMatrix;
b.CodeText = "The quick brown fox jumps over the lazy dog\n"
+ "The quick brown fox jumps over the lazy dog\n";
b.CodeLocation = Aspose.BarCode.CodeLocation.None;
b.Save(@"c:\test_datamatrix.bmp", ImageFormat.Bmp);
BarCodeBuilder builder = new BarCodeBuilder();
builder.SymbologyType = Symbology.MacroPdf417;
int nSize = 4;
string[] lstCodeText = new string[] { "code-1", "code-2", "code-3", "code-last" };
string strFileID = "1";
for (int nCount = 1; nCount <= nSize; nCount++)
{
builder.CodeText = lstCodeText[nCount - 1];
builder.MacroPdf417FileID = int.Parse(strFileID);
builder.MacroPdf417SegmentID = nCount;
if (nCount == nSize)
builder.MacroPdf417LastSegment = true;
else
builder.MacroPdf417LastSegment = false;
builder.Save(strFileID + "_" + nCount + ".png", ImageFormat.Png);
Process.Start(strFileID + "_" + nCount + ".png");
}