| 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
[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 |

