|
Post by syschen on Jun 7, 2019 4:40:21 GMT 1
Hi Jos,
I have a Foxpro accounting program that can print reports to laser printers just fine. But when trying to print shipping label to a thermal printer all I get is lines of numbers instead of barcode and address. What can be the problem?
Thanks.
|
|
|
Post by Jos on Jun 7, 2019 7:45:23 GMT 1
I guess the program sends codes that are to be interpreted by the printer. Add the RAW option to the printer definition in config.txt so the codes are sent as-is to the printer.
Jos
|
|
|
Post by syschen on Jun 7, 2019 20:34:24 GMT 1
I put one single line in the config.txt: LPT1 = RAW Did not make any difference to the print out. I have attached the #LPT1.txt and #LPT1.asc files Attachments:LPT1.asc (1.86 KB)
LPT1.txt (3.68 KB)
|
|
|
Post by Jos on Jun 7, 2019 20:43:22 GMT 1
The FoxPro program is printing to LPT1 for the labels? Could you then post the created #lpt1.asc.
Jos
|
|
|
Post by syschen on Jun 7, 2019 20:47:52 GMT 1
Please see above post for attachments
|
|
|
Post by Jos on Jun 7, 2019 21:00:47 GMT 1
Missed your edit.
Seems all to be correct, the output contains commands for the label printer to interpreter. Could be a stupid question: After adding LPT1 = RAW, did you actually print to the label printer? Mostly those are connected to a serial port, or a serial-to-USB(or network) device.
Jos
|
|
|
Post by syschen on Jun 7, 2019 21:29:12 GMT 1
I exit and reenter, now it prints almost perfect. The minor problem is that it is a little off. Please see the attached picture Attachments:
|
|
|
Post by Jos on Jun 7, 2019 21:50:23 GMT 1
With the RAW option, vDos will pass your programs printer output as-is to the physical printer.
I suspect your program doesn't print to LPT1, so the RAW option isn't effective. Instead it would print to LPT2, COM1, whatever. Since nothing (no RAW) is defined for that DOS device, vDos will do some formatting (default margin settings) before the printer data is sent to the label printer.
I also guess you have a Windows driver installed for the label printer. Doesn't matter, but would explain the margin settings by vDos. Main issue would be RAW isn't defined for the correct lable printer DOS device.
Jos
|
|
|
Post by syschen on Jun 7, 2019 21:57:21 GMT 1
I am pretty sure RAW was in effect. If I took the line "LPT1 = RAW" out from config.txt I would get a print out on the label that looks exactly like the #LPT1.txt file (previous attachment)
|
|
|
Post by Jos on Jun 7, 2019 22:10:04 GMT 1
The only thing that comes to mind would be a defunct label printer Windows driver, or the printer connected to a server.
Add a new Windows printer, Generic – Generic/Text Only. So we can be sure a Windows driver won’t mess up the output.
To definitely test, eventually open the #LPT1.ASC file in Notepad and print. Or do a COPY /B #LPT1.ASC LPT1 (if redirected) at the Windows command prompt.
Jos
|
|
|
Post by syschen on Jun 7, 2019 22:51:20 GMT 1
Sorry, I was not clear before. The printer was connected to LPT1 on a different PC and shared out. I am printing to a shared networked printer.
|
|
|
Post by Jos on Jun 7, 2019 23:10:12 GMT 1
Still, if you don't (or even do) print by Windows programs to that label printer, create Windows printers, Generic – Generic/Text Only. So you're sure Windows drivers don't mess up the RAW DOS output. Printing from workstations, use the Generic/Text only Windows printer driver, not some redirected LPTx.
Jos
|
|
|
Post by syschen on Jun 8, 2019 1:18:13 GMT 1
ok. I will give it a try. Will update you next week. Thank you so much for your help.
|
|