Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




26 posts

Geek


Topic # 129465 17-Sep-2013 08:45
Send private message

I'm trying to rig up a very cheap point of sale system for a friend, using a Brother QL-550 label printer to print the label for each stock item.  The label will contain a description of the item, a retail price, and a barcode defining the item in a sqlserver database.  I'm trying to use C# to do this, but I'm having no joy whatsoever.  

Has anyone had any experience in using this label printer via C# (Or VB.net), and can anyone give me any pointers on how to do it.

I've tried using the Brother SDK that came with it, but frankly that was worse than useless.  I can write to the printer, but not the information I want, in the format I need.

Any help would be gratefully accepted!


Create new topic
2985 posts

Uber Geek
+1 received by user: 293


  Reply # 896788 17-Sep-2013 10:32
Send private message

I have no idea about coding etc but from the applications I've seen most of them say to use the Dymo label printers as they use XML format for the labels which is easy to create.






26 posts

Geek


  Reply # 896817 17-Sep-2013 11:12
Send private message

Unfortunately, my mate has already got a QL-550, and he wants to use that.

 
 
 
 


3405 posts

Uber Geek
+1 received by user: 687

Trusted

  Reply # 896823 17-Sep-2013 11:20
Send private message

can you print a bitmap to it? if so you could render it yourself in the format you want then just get the printer to print that.



26 posts

Geek


  Reply # 896829 17-Sep-2013 11:30
Send private message

I've just cracked it. The secret is in graphics, but not a bitmap, a Graphics object.

As always, the answer is usually in a few lines of code:

string sText = string.Empty;
//int iX = 10;
//int iY = 5;

for (int i = 0; i < 5; i++)
{
Font drawFont = new Font("Arial", 10);
switch (i)
{
case 1:
sText = "Recycled Junk Company";
e.Graphics.DrawString(sText, drawFont, Brushes.Black, 10, 5);
break;
case 2:
sText = "Article Name";
e.Graphics.DrawString(sText, drawFont, Brushes.Black, 10, 25);
break;
case 3:
sText = "Cost $100.00";
e.Graphics.DrawString(sText, drawFont, Brushes.Black, 10, 45);
break;
case 4:
drawFont = new Font("Free 3 of 9 Extended", 18);
sText = "20130917001";
e.Graphics.DrawString(sText, drawFont, Brushes.Black, 10, 75);
break;
}
}

I knew it would be something like that, I've read explanations on Google that run into hundreds of lines of code, and the developers manual from Brother need a PhD in ancient Abyssinian to use.

Any body wants to know how to address a label printer from C# - talk to me.

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Geekzone Live »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.