Hello,
we are testing Aspoce.Cells and Aspose.barcode and we have a little problem of “noise” in the barcode.
This is the “good” barcode printing with high resolution printer :
barcode good 150.jpg (582.6 KB)
The resolution of the barcode is 150.
This is the “bad” barcode printing with label printer (squix 4.3/200p) with resolution max of 203px
barcode bad 50 15.jpg (492.9 KB)
The resolution of the horizontal barcode is 50 and 15 for the vertical.
We can’t get a better result…
Have you an idea for our problem ?
We want to be sure that will work before buy the licence.
Code :
Dim STR_xls As String = "C:\programmes\scaldis\xls\Etiquette_Paquet_ISO_PAQ3.xlsm" Dim sheet As Worksheet Dim activeCell As Cell Dim XLSAPP_imp = New Workbook(STR_xls) Dim barcode As New MemoryStream Dim barcodeVertical As New MemoryStream Using generator As New BarCodeGenerator(EncodeTypes.Interleaved2of5, STR_PaqNumber) generator.CodeTextStyle.Location = CodeLocation.None generator.Resolution = 150 generator.Save(barcode, BarCodeImageFormat.Jpeg) generator.RotationAngle = 90 generator.Save(barcodeVertical, BarCodeImageFormat.Jpeg) End Using sheet = XLSAPP_imp.Worksheets().Item("Etiquette_CD") activeCell = sheet.Cells("B5") activeCell.Value = $"PAQ N° {vbCrLf}{STR_PaqNumber}" activeCell = sheet.Cells("B9") sheet.Pictures.Add(1, 10, 11, 12, barcodeVertical) activeCell = sheet.Cells("K3") sheet.Pictures.Add(9, 1, 11, 9, barcode) activeCell = sheet.Cells("B8") activeCell.Value = STR_PaqNumber Dim options As Aspose.Cells.Rendering.ImageOrPrintOptions = New Aspose.Cells.Rendering.ImageOrPrintOptions() options.PrintingPage = PrintingPageType.[Default] Dim sr As SheetRender = New SheetRender(XLSAPP_imp.Worksheets().Item("Etiquette_CD"), options) sr.ToPrinter(Configs.PrinterName)