8 Replies - 3977 Views - Last Post: 12 October 2011 - 02:47 PM Rate Topic: -----

#1 Ace26  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 183
  • Joined: 10-August 08

Sending Printer Output To Point-Of-Sale Printer

Posted 30 August 2011 - 07:45 AM

I am currently working on a store management system for a client which involves printing out receipts for every sale at the checkout counter using a point-of-sale printer.

To enable this functionality, I downloaded and read through the SDK of Microsoft Point of Service for .NET v1.12 API. Now I have started out at writing the service object for the point-of-sale printer but have encountered a problem while overriding the PrintNormalImpl method. I don't have the slightest inkling on how output is actually sent to the printer!

For ordinary printing operations, all you have to do is call the Graphics.DrawString() method of PrintPageEventArgs and that handles outputting. But with pos printers does anyone have an idea how to actually output data to the printer?

Thanks.

This post has been edited by Ace26: 30 August 2011 - 07:49 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Sending Printer Output To Point-Of-Sale Printer

#2 CreaturGames  Icon User is offline

  • D.I.C Regular

Reputation: 30
  • View blog
  • Posts: 290
  • Joined: 29-December 09

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 30 August 2011 - 12:52 PM

View PostAce26, on 30 August 2011 - 08:45 AM, said:

I am currently working on a store management system for a client which involves printing out receipts for every sale at the checkout counter using a point-of-sale printer.

To enable this functionality, I downloaded and read through the SDK of Microsoft Point of Service for .NET v1.12 API. Now I have started out at writing the service object for the point-of-sale printer but have encountered a problem while overriding the PrintNormalImpl method. I don't have the slightest inkling on how output is actually sent to the printer!

For ordinary printing operations, all you have to do is call the Graphics.DrawString() method of PrintPageEventArgs and that handles outputting. But with pos printers does anyone have an idea how to actually output data to the printer?

Thanks.

Well, I don't really have much knowledge in the SDK, but I think it would just be the same thing as if you were just printing text on a regular piece of paper,but I maybe wrong. Are you able to test this?
Was This Post Helpful? 0
  • +
  • -

#3 ragingben  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 170
  • View blog
  • Posts: 637
  • Joined: 07-October 08

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 31 August 2011 - 01:30 AM

Good point, CreaturGames. Is the POS selectable as a printer? IF so you could just use the standard PrintDialog box to select the printer and send data to it. Else, do you have the SDK documentation? If so does it have any tutorials/examples? Thiss seems like a common enough action with any POS that they would include an example with the SDK.
Was This Post Helpful? 0
  • +
  • -

#4 Ace26  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 183
  • Joined: 10-August 08

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 31 August 2011 - 04:30 AM

The SDK does come with examples and as helpful as they are in other aspects, sending printer output is not exactly touched. That's why I find it hard to move on. What's contained in the SDK is just a simulated scenario where output is displayed on the screen not sent to any printer.

I just want someone who's worked with on this kind of application (using Microsoft's Point of Service for .NET API) to just answer this one question: To send output to the POS Printer did you use the PrintDocument class of the System.Drawing.Printing namespace to go about it? If not then how did you send printer output to the POS printer?

That's all I need clearance on.

Thanks.
Was This Post Helpful? 0
  • +
  • -

#5 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 31 August 2011 - 11:32 AM

How is the printer connected? LPT port? USB? Serial? Have you checked with the printer manufacturer? What printer model is it?
Was This Post Helpful? 0
  • +
  • -

#6 CreaturGames  Icon User is offline

  • D.I.C Regular

Reputation: 30
  • View blog
  • Posts: 290
  • Joined: 29-December 09

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 31 August 2011 - 11:46 AM

View PostAce26, on 31 August 2011 - 05:30 AM, said:

The SDK does come with examples and as helpful as they are in other aspects, sending printer output is not exactly touched. That's why I find it hard to move on. What's contained in the SDK is just a simulated scenario where output is displayed on the screen not sent to any printer.

I just want someone who's worked with on this kind of application (using Microsoft's Point of Service for .NET API) to just answer this one question: To send output to the POS Printer did you use the PrintDocument class of the System.Drawing.Printing namespace to go about it? If not then how did you send printer output to the POS printer?

That's all I need clearance on.

Thanks.

That is odd. They should have at least had documentation on how to print the output, unless the printing is the same as printing from a regular printer.

And, I don't know if the connection of the printer matter at this moment because different printers work for the Print functions of C#(correct me if I am wrong).

Yes, as eclipsed4utoo stated, contact them via email and ask them if they could provide an example of how to use the print methods for what you need.
Was This Post Helpful? 0
  • +
  • -

#7 Ace26  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 183
  • Joined: 10-August 08

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 01 September 2011 - 11:41 AM

I have solved my problem.

I Was trying all along to build a custom service object when all I needed to do was use Microsoft's POS for .NET API that abstracts away the need to target a specific point of service(POS) device.

Thanks for you time, all. Grateful you even cared enough to look into it with me.

Cheers
Was This Post Helpful? 0
  • +
  • -

#8 ragingben  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 170
  • View blog
  • Posts: 637
  • Joined: 07-October 08

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 02 September 2011 - 02:21 AM

Awesome Ace26, glad you got it sorted :)
Was This Post Helpful? 0
  • +
  • -

#9 Shaggs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-October 11

Re: Sending Printer Output To Point-Of-Sale Printer

Posted 12 October 2011 - 02:47 PM

View PostAce26, on 01 September 2011 - 11:41 AM, said:

I have solved my problem.

I Was trying all along to build a custom service object when all I needed to do was use Microsoft's POS for .NET API that abstracts away the need to target a specific point of service(POS) device.

Thanks for you time, all. Grateful you even cared enough to look into it with me.

Cheers


Ace26,

I'm in a similar situation. I have used the provided sample (with the .net for pos download) to output the pos receipt to the emulator, but I have no idea how to select and send it to a printer. Can you point me in the right direction here, of how to use the API for this?

Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1