Background:
What I have done:
Question:
I have referred to the sample in this page but it doesn't work.
XlsxFormatProvider formatProvider = new XlsxFormatProvider();
Workbook workbook = formatProvider.Import(File.ReadAllBytes(@"C:\temp\temp.xlsx"));
var worksheet = workbook.Sheets[0] as Worksheet;
FindOptions f = new FindOptions();
f.FindWhat = "$PART_NAME_LABEL$";
IEnumerable<FindResult> result = worksheet.FindAll(f);
foreach(var i in result)
{
worksheet.Cells[i.FoundCell.CellIndex].SetValue("");
//Add barcode here
RadBarcode radBarcode1 = new RadBarcode();
Telerik.WinControls.UI.Barcode.Symbology.Code39Extended code39Extended1 = new Telerik.WinControls.UI.Barcode.Symbology.Code39Extended();
radBarcode1.Symbology = code39Extended1;
radBarcode1.Value = "123456";
radBarcode1.LoadElementTree();
var ms = new MemoryStream();
Image barcode = radBarcode1.ExportToImage();
barcode.Save(ms, ImageFormat.Png);
FloatingImage image = new FloatingImage(worksheet, i.FoundCell.CellIndex, 35, 10);
image.ImageSource = new Telerik.Windows.Documents.Media.ImageSource(ms, "png");
}
Hello,
we are creating a barcode programmatically like it is described here: https://www.telerik.com/forums/generate-barcode-image-programmatically
The problem is, that the barcode itself is a bit small (width) for our purpose.
Our code looks like this:
var barcode = new RadBarcode();
barcode.Width = 900;
barcode.Height = 150;
barcode.Symbology = new Code39();
barcode.Value = "1890";
barcode.LoadElementTree();
var barcodeImage = barcode.ExportToImage(900, 150);
barcodeImage.Save(@"C:\test.png");
But if you look at the attached image (test.png), it has the correct size alright, but not the barcode itself.
Is there away to give the barcode itself more width?
Kind regards.
In many other Datamatrix controls the tilde character is used to recognize special characters like FNC1 for GS1-Datamatrix. The documentation is very scarce. https://docs.telerik.com/devtools/winforms/controls/barcode/barcode-types/2d-barcodes/datamatrix/overview
Is there support for control characters?
How can I represent <RS> (record separator), <GS> (group separator) and <EOT> (end of text) in the Datamatrix string?
Hi,
I am using Barcode inside the cross tab.
I want to print Barcode like Figure 2. Currently shows Figure 1.
waiting for your favorable response.
Thanks.
Hi everybody, I'm evaluating RadBarcode for printing barcodes in thermal printers. My printers have a resolution of 203 dpi in both horizontal and vertical directions. I'm trying to generate an image of the barcode (EAN13) and sending to printer:
public DrawBarcode(Point Location, Size Size, string valor): base(Location)
{
this.Valor = valor;
bc = new RadBarcode();
bc.Value = valor;
var EAN13 = new Telerik.WinControls.UI.Barcode.Symbology.EAN13();
EAN13.ShowText = true;
bc.Symbology = EAN13;
EAN13.Stretch = true;
int n = 50;
while (true)
{
try
{
img = bc.ExportToImage(2*n, n);
this.size = img.Size;
return;
}
catch (Exception) { n += 10; }
}
}
public override void Draw(Graphics g)
{
base.Draw(g);
g.DrawImage(img, 0, 0);
}
I have a base class for controling Drag, zoom and rotation but it is not important in this scenario. When I send the image to screen, text is rendered perfectly but when I send the image to the printer, text is not redeable. Is it any why to specify resolution in ExortToImage or any other why to change generated image resolution?
I have used this code to generate barcode to excel. I tried Code 39 and EAN128. But the barcode scanner cannot read. What is missing in here? Where can I find demo & documentation for winform barcode to excel? Thanks.
Telerik.WinControls.UI.Barcode.Symbology.EAN128 code39Extended1 = new Telerik.WinControls.UI.Barcode.Symbology.EAN128();
RadBarcode rBL = new RadBarcode();
rBL.Symbology = code39Extended1;
rBL.Value = "EE4698";
rBL.LoadElementTree();
Image imgBL = rBL.ExportToImage();
imgBL.Save("c:\\temp\\img.jpg");
oSheet.Cells[1, 1] = "EE4698";
oSheet.Shapes.AddPicture("c:\\temp\\img.jpg", MsoTriState.msoFalse, MsoTriState.msoCTrue, 50, 50, 300, 45);
Hello,
I am build a windows form application for barcode generation. How can I change barcode forecolor? I have button for selecting color.
click the button name is "btnforcolor" then show color dialoguebox. Then select forecolor for my radBarcode component. Please help me.
My code given below
private void btnForeColor_Click(object sender, EventArgs e)
{
using (ColorDialog cdialog1 = new ColorDialog())
{
cdialog1.AnyColor = true;
if (cdialog1.ShowDialog() == DialogResult.OK)
{
radBarcode1.ForeColor = cdialog1.Color;
this.btnForeColor.BackColor = cdialog1.Color;
}
}
}
and Page Loading
private void SecondCustomControle_Load(object sender, EventArgs e)
{
this.btnForeColor.BackColor = radBarcode1.ForeColor;
this.btnBackColor.BackColor = radBarcode1.BackColor;
}
but this is not working. Please Help me.Thanks In advance.
Hi for some reason we have as tricks appearing at either end bar code however we just want the text. We had set it to code 128 I persumed it should be the standard of no extra characters.