Missing Data On Label When Printing To Zebra Printers And Hp Printers 追蹤

0
Avatar
Legacy Poster

Hello,
I have a server application that prints labels to multiple network printers through Bar Tender Version 10.0 SR4 under win server 2008R2 SP1.
Once in a while sporadically some of the labels comes out with missing data on them.
We are collecting logs for each job in bar tender and they all looks OK. The data sent to the printer includes all the information should be printed on the label.
If we are trying to reprint the same label again, it comes out OK.
We are working with the latest drivers for the printers.
Any idea on what we are missing here?
I'm attaching an image of a label. The missing data should appear in the red box area

4 意見

0
Avatar
Ian Cummings
版主
評論操作 永久連結

How are you going about printing the labels?  Is this done from within the BarTender application in a manual sense, or is this automated through something like Commander?  If the latter then I suggest you assign more desktop heap memory in the in the BarTender command handler.  Check the Commander trouble shooter for more details: http://forums.seagullscientific.com/index.php?/topic/55-commander-troubleshooting/

0
Avatar
Legacy Poster
評論操作 永久連結

Hi, thank you for the replay

 

I'm using .NET SDK for printing a label from C#

0
Avatar
Legacy Poster
評論操作 永久連結

hello again, this is my code that i'm using in order to print

 

        public static void PrintLabel(string formatName, string printerName, Dictionary<string, string> parameters, int identicalCopiesOfLabel, int numberSerializedLabels, UdiScriptBase parent, bool failIfParamMissing = false)
        {
            // get the label document format from the engine, using the format name and printer name
            LabelFormatDocument document = BTEngine.Documents.Open(formatName, printerName);

            // go over all substrings in the label format
            for (int index = 0; index < document.SubStrings.Count; index++)
            {
                // check if the parameters dictionary 
                if (parameters.Keys.Contains(document.SubStrings[index].Name))
                {
                    string value = parameters[document.SubStrings[index].Name];

                    if (!String.IsNullOrEmpty(value))
                    {
                        document.SubStrings[index].Value = value;
                    }
                }
                else // there is no value in the parameters dictionary for this substring
                {
                    string value = " ";
                    document.SubStrings[index].Value = value;

                    // check if we need to fail this print
                    if (failIfParamMissing)
                    {
                        throw new Exception(String.Format("There is no value in the parameters dictionary for the {0} substring of the label: {1}.", document.SubStrings[index].Name, formatName));
                    }
                }
            }

            // set copies and serialized copies
            document.PrintSetup.IdenticalCopiesOfLabel = identicalCopiesOfLabel;
            document.PrintSetup.NumberOfSerializedLabels = numberSerializedLabels;

            Messages btMessages = null;
            bool printResult=true;

            if (document.Print(formatName, out btMessages) != Result.Success)
            {
                printResult = false;
            }

            if (printResult == false)
            {
                throw new Exception("Failed to Print BT!!");
            }
        }

0
Avatar
Ian Cummings
版主
評論操作 永久連結

Is your project building an application or a Windows service.  If the latter then you might be getting the same desktop heap issue as what Commander can suffer from.  Have you tried doing a full uninstall of the printer driver, reboot, and then reinstall of the latest?  Perform a factory default reset on the printer just in case there is a glitch in memory.  Enable printer code recording in the printer driver under the tools tab.  You can then check to see if the printer code we generate is 100% valid or "contains" the missing items.  At least that way we will know better where to look.  What type of label object is it that goes missing, is it a device or graphical item, static or variable, and is it always that object only that is sometimes lost?

登入寫評論。