File tree Expand file tree Collapse file tree
Generate-Barcode-labels/Console-APP-.NET-Core/Generate-Barcode-labels Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >netcoreapp2.1 </TargetFramework >
5+ <TargetFramework >net8.0 </TargetFramework >
66 <RootNamespace >Generate_Barcode_labels</RootNamespace >
77 </PropertyGroup >
88
Original file line number Diff line number Diff line change 44using Syncfusion . Pdf . Graphics ;
55using System ;
66using System . Data ;
7- using System . Drawing ;
8- using System . Drawing . Imaging ;
97using System . IO ;
108
119namespace Generate_Barcode_labels
@@ -58,11 +56,8 @@ private static Stream GenerateBarcodeImage(string barcodeText)
5856 barcode . BarHeight = 45 ;
5957 barcode . Text = barcodeText ;
6058 //Convert the barcode to image
61- Image barcodeImage = barcode . ToImage ( new System . Drawing . SizeF ( 145 , 45 ) ) ;
62- //Converts image to stream
63- MemoryStream stream = new MemoryStream ( ) ;
64- barcodeImage . Save ( stream , ImageFormat . Png ) ;
65- return stream ;
59+ Stream imageStream = barcode . ToImage ( new Syncfusion . Drawing . SizeF ( 145 , 45 ) ) ;
60+ return imageStream ;
6661 }
6762
6863 /// <summary>
You can’t perform that action at this time.
0 commit comments