I am working on reading a barcode containing two barcodes from a scanner that provides the UPC barcode and a quantity purchased in a single barcode. The barcode scanner is a USB emulating a keyboard (typical out of the box configuration). I cannot use pre and/or post characters to differentiate the barcodes. The scanner provides a return key after each of the two codes. When I scan to Notepad, I get the UPC code, a return character, the quantity and another return character.
I am coding in C# using Visual Studio 2010 Pro. I have tried using a textbox that accepts returns and setting it to multiline but I only get the UPC code. I have found no way thus far to capture the quantity amount as well. HELP!!!
Is your goal to get the codes into a text box, or is your goal to capture the codes and use them in a program somehow? If it's the latter, you probably want to make your own widget that accepts key events, and then getting the return characters should come naturally.
Related
For the first time I've been given this Thermal printer (M325A) to use, at this stage I have ZERO idea of how to code my desktop application to print "ANYTHING". But my present requirement will be to print just 4 lines of information:-
Pre-mentioned Static Banner (Big text),
User supplied numeric value (Non-Decimals),
Serial Number (Progressive),
Current Date & Time.
Kindly help me start.
While there are printing libraries out there, you can as well directly connect to the printer, over serial, USB, or, ethernet, and send it the commands to print. ESC/POS capable printers interpret escape sequences, which are very well documented. You must, however, get to know how you can send binary data (i.e. 8-bit bytes) directly to the printer.
As part of a project I need to convert a numer to a barcode, then send a list of those numbers (or barcodes depending when the conversion should be done) to a printer to be printed on small sticker labels.
So far I have the list I need, but 2 things I have never done before and would like poiners are:
How do you convert to a barcode, is there a plug-in, or can this be done within ASP.NET / C# without any 3rd party dll?
Once I have the make / model of the printer and the dimensions of the label, should I be looking for a plug-in for this, or try to create a template.
Thanks in advance
I am creating a web application (ASP.NET C#) where I need the encoded barcode text.
Example: EAN13 numbers: 460650003296. The output encoded barcode is then: Y(6A65AA*KNMTQT(
And that is the value I will need to have.
I have tried to use BarCodeLib and that it´s working great to generate barcodes images but I can´t find any way to get the encoded text, I have also tried KA Barcode but with the same result.
Does anyone have any experience in this libaries and if it´s possible to get the encoded text from them, or some other suggestion how I can get the encoded value?
I don't have any experience with this library that you are using. However, my company created a web application that use different commercial library for reading and writing 1-D barcodes (including the EAN13).
We started our web application using the following 2 tutorials:
Reading Barcodes
Writing Barcodes
You can get more details from their support team using this email:
support#leadtools.com
I'm trying send ActiveReports formatted reports to my company's RightFax server, and pre-set some of the fax fields, like FAX number, sender, and recipient. The RightFax documentation says that the document must include Embedded Codes to set these values, e.g. <TOFAXNUM:12345556789><TONAME:Recipient><FROMNAME:Sender>. I create a TextBox or Label in ActiveReports that contains this text. But the values are not set when RightFax receives the document and brings up the RightFax client UI. The Embedded Codes remain in the fax image. I have the RightFax printer driver set to HP LaserJet 4. I'm developing in C#, using Visual Studio 2010 Professional.
One suggestion on the web is to make sure the Embedded Codes are set in Courier or another "printer font". However, Visual Studio does not have "Courier" or "Times Roman", only MS true type versions of these standard fonts, "Courier New" and "Times New Roman".
This method of sending faxes is working with older software, that doesn't use ActiveReports, on another machine using the same RightFax server.
Any experience you can share interfacing ActiveReports to RightFax would be most appreciated.
Thanks,
Gregg Lobdell
You could accomplish your task by controlling the whole printing process and sending the escape sequence using Windows API. I assume you using ActiveReports 6 or section-based reports of ActiveReports 7.
In more detail:
create your own PrintDocument and define PrintPage handler
in the PrintPage handler send escape sequence to printer using Escape winapi call (see the example on CodeProject)
render the page itself by calling the Page.Draw()
As long as you use a true type font, the printer should recognize that font and be able to "read" the text in it. Only old bitmap fonts are fonts that might be not readable by the printer. Usually commonly used TT fonts on windows like "Courier New" or "Times New Roman", are already in the printer so they won't even be downloaded.
However, RightFax does have some documentation on escape codes here, so you might want to try using escape codes with ActiveReports. Also, here is an example of using the SystemPrinter object in ActiveReports6 to send escape codes directly to the printer without using any special API. You might try using that code and replacing the escape code there with ones that RightFax understands.
Finally, ActiveReports essentially prints by getting a graphics from the printer and drawing on it. Textboxes are real text drawn with appropriate text commands (i.e. text is not rendered as bitmaps). This is a normal way of printing in modern windows so any printer should see the text as normal text. You should be abel to see the same exact results by writing your own simple printing code in .NET and sending it to the RightFax driver. If it works there it will work in ActiveReports.
If it isn't working, and the escape code trick above won't work, I think contacting RightFax and asking them for insight into how to print to their driver from a .NET application would be the next logical step.
Hope this helps!
I have a receipt made using Crystal Reports where the page is 4 inch wide and the height should be dynamic. I set the height to 2 inches, because I don't know how to make it dynamic. The printer is a TVS RP-45 Justbill printer.
The printer is ejecting paper after printing. How do I stop this from happening?
Any solution besides Crystal Reports would be helpful. The program is written in C# .NET 2.0 Winforms and connects to a SQL Server 2005 database.
Report Header Section
Bill no : 101
______________________________________________
Detail Section
Item Code Qty Amount
[ItemCode] [Qty] [Amount]
______________________________________________
Report Footer Section
Grand Total [GrandTotal]
______________________________________________
The Report Footer Section is using around 2 inches so I set the Height of the paper to 2 inches. This did not solve the problem. The paper height is now 2 times what it should be if there is more than 1 item.
The printer uses roll paper and it should feed more paper proportionally with the number of items sold.
Please help me solve this without wasting paper.
I'm going to suggest something a little different.
Create a new document in Notepad on Windows or a plain text editor on other OS's.
This document (.txt) should just contain one line: TEST_LINE_1
Send that document to your printer and see if the same after print feed continues.
If it continues to feed after the single line of print:
Check settings as follows ( I know you said you've already checked ):
From the manual:
[ http://www.tvs-e.in/pos/pdf/RP-45%20User%20Manual.pdf ]
To set the factory settings of the printer, first press FONT, Line feed and
PRINT buttons together and then switch ON the printer using ON/OFF
switch.
Usually you have to hold those buttons while switching it off and back on - hold until the printer prints its config off.
If you can post back with what the print out says word for word that would be good.
If it doesn't feed after the single line:
Your design is most likely too wide for the format/internal limits of the paper width and it's wrapping around onto a new line for every line you have.
Are you able to post a photo of what is being printed with how much paper it's on-feeding by?
Try printer on a different computer or laptop if possible with single line text file (as above) or with your custom report job - is it the same output?
If the printer is installed as a USB device: Remove all traces of the driver files and completely uninstall it as a printer - reinstall fresh copies and see what happens - the same?
I appreciate some of these things always 'seem obvious' when you're up against a problem but it does help to start over with the most basic of things..
Just remove headers and footers, It will work fine.