I was trying to create barcodes (incluing the codetext lables) with a fixed width and height.
I required the barcode image size
height 2.4 cms
width 6.9 cms
Dim bb As Aspose.BarCode.BarCodeBuilder
bb =
New Aspose.BarCode.BarCodeBuilder
bb.BorderVisible =
True
bb.ImageUnit = System.Drawing.GraphicsUnit.Millimeter
bb.ImageWidth = 69.0F
bb.ImageHeight = 24.0F
bb.SymbologyType = Aspose.BarCode.Symbology.Code128
bb.Resolution =
New Resolution(400.0F, 400.0F, ResolutionMode.Customized)
bb.ImageQuality = ImageQualityMode.AntiAlias
bb.CodeText = strAssetTag
bb.CaptionBelow.Visible =
True
bb.CaptionAbove.Visible =
True
Dim captionCa As Caption = New Caption()
captionCa.Text = strEqpModel
captionCa.TextAlign = System.Drawing.StringAlignment.Center
captionCa.Visible =
True
bb.CaptionAbove = captionCa
'bb.print()
Dim ms As System.IO.MemoryStream
ms =
New System.IO.MemoryStream
bb.BarCodeImage.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp)
''saving as a image to memory stream - then adding to a dataset and later binding to a crystalreport/viewer
'even while printing sizes are different.
' I expect the image size 6.9 cms width and 2.4 cms height.. but is actually 6.5 cms and 2.2 cms