跳至主內容

搜尋

搜尋

Some Troubles In Printing

評論

3 條評論

  • Avatar
    Legacy Poster

    Any ideas?

    0
  • Avatar
    Ian Cummings
    版主

    Difficult to give solutions on the information given, but first off be sure to make sure the latest service release (build 2561) of BarTender v9.01 is installed:

     

    http://www.bartenderbarcodesoftware.com/label-software/fixes_90.aspx

     

    Is this a web printing application that you're integrating with BarTender?  What form of printing are you performing; standard Windows or internet printing?

     

    The default timeout for the "WaitForJobToComplete" is -1 which means it waits for an infinite amount of time.  If you wish to WaitForJobToComplete then be sure to set a finite timeout in ms.  Have you considered using the PrintOut() method instead?

    0
  • Avatar
    Legacy Poster

    Release 2561

     

    It's web service:

     

                // Start the BarTender print engine.
                btEngine.Start();

                // Open a format.
                LabelFormatDocument btFormat = btEngine.Documents.Open(labelpath, printer);
                ((OLEDB)btFormat.DatabaseConnections[0]).SQLStatement = SQL;
                btFormat.PrintSetup.IdenticalCopiesOfLabel = copies;

                Messages btMessages;
                // Print the format.
                Result nResult = btFormat.Print("OUT Sticker", out btMessages);

                if (nResult != Result.Success)
                    foreach (Message m in btMessages)
                        alert += "Text = " + m.Text;

                // Close the current format without saving.
                btFormat.Close(SaveOptions.DoNotSaveChanges);

                // Stop the BarTender print engine.
                btEngine.Stop();

    0

登入寫評論。