I have an Epson TM-U220A, I am writing and c# desktop application to print receipt. But it is unable to find the printer.
The printer prints strange characters if i send something via notepad (thus its working)
I have the following:
Code:
private void FormLoad(object sender, System.EventArgs e)
{
//<<<step1>>>--Start
//Use a Logical Device Name which has been set on the SetupPOS.
string strLogicalName = "PosPrinter";
// string strLogicalName = "ESDPRT001";
try
{
//Create PosExplorer
PosExplorer posExplorer = new PosExplorer();
DeviceInfo deviceInfo = null;
try
{
deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, strLogicalName);
m_Printer = (PosPrinter)posExplorer.CreateInstance(deviceInfo);
}
catch (Exception)
{
ChangeButtonStatus();
return;
}
//Open the device
m_Printer.Open();
//Get the exclusive control right for the opened device.
//Then the device is disable from other application.
m_Printer.Claim(1000);
//Enable the device.
m_Printer.DeviceEnabled = true;
}
catch (PosControlException)
{
ChangeButtonStatus();
}
//<<<step1>>>--End
}
Error: The port name is illegal, or couldn't be connected to the device. On line: m_Printer.Claim(1000);
Make sure the USB cable is connected securely at both ends and meets the requirements. Run a printer check. If the test page prints, make sure your software is installed correctly. Make sure the printer cover is closed.
If you cannot print over a network, try these solutions: Make sure that your product is turned on. Make sure you install your product's network software as described in your product documentation. Print a network status sheet and verify that the network settings are correct.
Select Printer Settings from the drop-down list, and select the Basic settings tab. Select Advanced. You will find the predefined settings in the list on the right of Automatic. Select the most appropriate setting from the list according to the type of document or image you want to print.
If your Epson product is not printing properly, search for your specific product on our printer hub page to obtain helpful troubleshooting information. Some common printing issues include banding, incorrect colors appearing, blurry prints, grainy prints, or faded prints. Search for your printer
In my experience working with Epson POS printers having the Windows printer driver installed prevents using the printer in any other way. I think the first thing you should try is deleting the printer, set it up again in SetupPOS, and try your program again. Good luck! this works as is ... not sure why this would've been the issue.
Epson Printer Errors. If your printer is displaying an error code or message on the control panel, search for 'Error code' on your product's FAQs tab. Examples include 'Paper jam,' 'Replace maintenance box,' and 'Printer is Offline.'. Search for your printer.
Then, print an operation check page. See Running a printer operation check. If the check page prints correctly, make sure that the printer software and your application are installed correctly. If you are trying to print a large image, your computer may not have enough memory to print. Try printing a smaller image.
In my experience working with Epson POS printers having the Windows printer driver installed prevents using the printer in any other way.
I think the first thing you should try is deleting the printer, set it up again in SetupPOS, and try your program again.
Good luck!
please Check the configuration.xml file. Port NAme must be same as in xml And SetupPOS that should be in serial Port.
For xml configuration Please check this link http://social.msdn.microsoft.com/Forums/en-US/5baad480-f2be-4cc9-94e0-572a3fa4697a/sharing-information-for-posnet-112-epson-tmt88v?forum=posfordotnet
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With