2

I have an issue with a Barcode that I'm trying to print. It has horizontal white lines and I couldn't read the code with a barcode reader. I'm using Telerik RadControls for WPF.

I generate the object in code-behind like that:

public RadBarcode128 CrearBarCode(Guia guia)
    {
        RadBarcode128 barcode = new RadBarcode128();
        barcode.Text = guia.TipoFactura.ToString() + guia.AgenciaOrigenId.ToString() + "-" + guia.CodigoGuiaNumerico;
        barcode.Height = 40;
        barcode.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
        return barcode;
    }

That object is part of a FlowDocument, here is the code that calls CrearBarCode method:

        RadBarcode128 barCode = CrearBarCode(bulto.Guia);
        BlockUIContainer bl = new BlockUIContainer();
        bl.Margin = new Thickness(0);
        bl.Child = barCode;

        flowDocument.Blocks.Add(bl);

Then, when I send that to the printer, it looks like this (the image is not mine, but the problem is the same). Look the lines that cross the Barcode:

enter image description here

I tried to adjust barcode heigth (as you can see in CrearBarcode) but I couldn't remove the white lines. Also, I tried setting the FlowDocument.LineHeigth property with a larger number, but it didn't work. The problem persists. Do you know what should I try to remove the lines?

Thanks.

4

0 回答 0