Rotate Barcode Image

Skip to end of metadata
Go to start of metadata
Aspose.BarCode allows developers to rotate the barcode image by setting the RotationAngleF property of the barcode class.

Figure: Demonstration of common rotation angles

Programming Sample
[C#]
//Instantiate barcode object
BarCodeBuilder bb = new BarCodeBuilder();

//Set the Code text for the barcode
bb.CodeText = "1234567";

//Set the symbology type to Code128
bb.SymbologyType = Symbology.Code128;

//Set the rotation angle of the barcode to 180 degree
bb.RotationAngleF = 180;

//Save the image to your system
//and set its image format to Jpeg
bb.Save("barcode.jpg",
   System.Drawing.Imaging.ImageFormat.Jpeg);
 
[VB.NET]
'Instantiate barcode object
Dim bb As BarCodeBuilder = New BarCodeBuilder()

'Set the Code text for the barcode
bb.CodeText = "1234567"

'Set the symbology type to Code128
bb.SymbologyType = Symbology.Code128

'Set the rotation angle of the barcode to 180 degree
bb.RotationAngleF = 180

'Save the image to your system
'and set its image format to Jpeg
bb.Save("barcode.jpg",
   System.Drawing.Imaging.ImageFormat.Jpeg)
 

The barcode (rotated to 180 degree) generated after executing the above code is shown in the figure below:Figure: Barcode rotated to 180 degree after example code execution

You might set BarCodeBuilders's ImageQuality to AntiAlias to achieve better image quality
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.