1

Closed

Problems with GraphicZebraCommand

description

Received via email and posting here for the benefit of users.
 
I'm having problems printing PCX images. When i use the GraphicZebraCommand, i pass the filename and position.It prints the image but it also prints noise(like a bar). I don't know what it is. When i delete this command the label is printed correctly. Do you have any idea?
 
Here is my code:
 
class CustomLabel : IZebraCommand
{
   private readonly string commandString;
 
   public CustomLabel(string line1, string line2, string barcode)
   {
       commandString = new LabelBuilder()
           .Border(20, 20, 500, 235)
           .Border(20, 20, 500, 90)
           .Border(290, 20, 500, 90)
           .Border(20, 90, 500, 135)
           .Border(20, 90, 255, 135)
           .Barcode("E0052008000005613").At(120, 140)
           .LargeText("DATE").At(318,30)
           .Text("TIME").At(338,60)
           .SmallText("TEXT1").At(24, 105)
           .SmallText("TEXT2").At(260, 105)
           .Image("logo4.pcx").At(21, 25).ToZebraInstruction();
   }
 
Thanks in advance.
Closed Aug 2, 2009 at 1:55 PM by thekua
Unable to replicate

comments

thekua wrote Apr 23, 2008 at 1:36 PM

Hi there,

As far as I know, the Zebra printers only support a 2-bit PCX file format (i.e. black and white). Most image programs save them into a 16-bit or other version. A few programs that I know of can save them into this file format including Gimp (http://www.gimp.org/) and PaintShopPro. I know that trying to send something that is not saved in this special monochrome format does result in noise as you describe it.

Thanks.


Patrick

unosan wrote Apr 23, 2008 at 1:50 PM

Thanks for your reply, Patrick. I knew the problem of the file format so I converted a jpeg file to a 2 bit PCX file format. It's converted in RLE compression. I have attached the file for testing purposes. Please, can you test this file in your printer?. Thanks in advance.

wrote Apr 23, 2008 at 1:50 PM

wrote Apr 23, 2008 at 1:58 PM

wrote Apr 23, 2008 at 1:58 PM

thekua wrote Apr 23, 2008 at 2:00 PM

I know that I've had some issues with the size of an image before. Can you please try resizing your image (smaller/larger) and see if makes a difference. I can't explain why though I know it sometimes has a better effect. I've found one image size may be better than another.

Nchantim wrote Sep 24, 2008 at 4:44 PM

I have trouble with the graphics printing with 2-bit PCX. The first time I run this function. If I call it again, then I don't get the noise.
    Dim myComms As New Com.SharpZebra.ZebraCommands
    myComms.Add(Com.SharpZebra.Commands.ConstantCommands.START_NEW_PRINT_JOB)
    Dim myGr As New Com.SharpZebra.Commands.GraphicZebraCommand(strPic, 10, 10)
    myComms.Add(myGr)
    myComms.Add(Com.SharpZebra.Commands.ConstantCommands.PRINT_ONE_COPY)
    myComms.Add(Com.SharpZebra.Commands.ConstantCommands.START_NEW_PRINT_JOB)

    Dim myPrintR As New Printing.ZebraPrinter(strPrinter)
    myPrintR.Print(myComms)

If I call a function to print a barcode or to print text, then call the graphic function I get the noise.
Using a Zebra 2746e with latest driver.
I've tried various sizes for the graphic, and used frodoshop to convert to 2-bit pcx.

wrote Aug 2, 2009 at 1:55 PM

wrote Feb 14, 2013 at 8:11 PM

wrote May 16, 2013 at 9:47 AM