I have developed a C#.NET application to print cards, and it works in a Fargo DTC 1000 printer. Now I've changed my printer (a Zebra ZXP series 3) for the same purpose, printing cards (only text), but it's not working. I always get the error "Creck the ribbon", but I've changed it. The printer works fine if I send to print from notepad.
The app communicates through LAN with the printer which is being shared in a server. APP-->Server-->Computer-->Printer
In conclusion, the code works and the printer works, also I reach the printer through the code. The problem is that I can't get it work through the code.
I'm using System.Drawing API.
Please, I ended up with all my ideas. Thank you in advance!
This are the main methods.
public void Print()
{
if (Parameter == null)
throw new Exception("No existen parametros para la impresión");
PrintDocument pd = new PrintDocument
{
DefaultPageSettings =
{
Landscape = true,
Margins = new Margins(0, 0, 0, 0)
},
PrinterSettings = {PrinterName = Parameter.PrinterName}
};
pd.PrintPage += pd_PrintPage;
pd.Print();
}
private void pd_PrintPage(Object sender, PrintPageEventArgs ev)
{
Font printFont = new Font("Arial", FontSize, FontStyle.Bold);
SetDataToPrint(Parameter.IdMovItem);
ev.Graphics.PageUnit = GraphicsUnit.Inch;
ev.Graphics.DrawString(Data.Asegurado, printFont, Brushes.Black, Parameter.AseguradoX, Parameter.AseguradoY,
new StringFormat());
ev.HasMorePages = false;
}