|
Post by wtc on May 13, 2021 19:33:14 GMT 1
Thank you, Jos, I believe I'll be able to get the PCI adapter, new, on Ebay, so everything will be fine, as long as 64 bit machines still have slots on their boards. Another question, if you have the time. I've been able to get my dBase to print to an USB printer through vDos, but all of the lines print on top of each other, which is surprising to see. I can tell that the lines are all printed out because the one line that's longer than the others is legible. Pretty clearly there is no carriage return after each line, and lines pile up and are printed in one sweep of the printer head. Is there a way of instructing vDos to add CRs, or is this strictly a dBase issue? Also, does the Windows command "set printer to net...." accept output from vDos? Thank you, again, Wayne
|
|
|
Post by Jos on May 13, 2021 20:00:14 GMT 1
I would go for an USB to parallel adapter. Still commonly available, and you can simply plug that into an USB port…
That would be missing linefeeds. Though if I open some file in dBaseV and print it, the output is correct. Perhaps there’s a dBase configuration switch for omitting/adding linefeeds. Eventually open #LPT1.asc in an editor like Notepad++, and check if linefeeds are indeed absent.
Don’t know what you mean with …"set printer to net...." accept output from vDos. If it’s about printing to a network printer, select that printer in the Select Printer Dialog. Or preselect it by LPTx/COMx = SEL:"Network_printer_name".
Jos
|
|
|
Post by wtc on May 13, 2021 20:31:51 GMT 1
Thank you, Jos, I'll order one of those USB to parallel adapters, today. As per printing out on an USB printer, I had added the line: LPT1=SEL "Canon-TR4500-series" TIO:1 and I got a printout of all the lines printed on top each other, as I described. When I look at the LPT1.asc and LPT1.txt, they appear perfectly normal and legible--just the way I would hand them to customers. As for the other question about a network printer, I'm alluding to the Windows command: NET USE LPT1 \\"printer name" I have gotten that up and running on a system with a networked printer, and have printed from dBase successfully. I'm wondering if I print through vDos to LPT1, will the output be redirected to the assigned printer? Your vDos works so well, I'm looking to expand my options. Sincerely, Wayne
|
|
|
Post by Jos on May 13, 2021 21:40:16 GMT 1
Opening (displaying) LPT1.asc or LPT1.txt in an editor doesn’t actually reveal the eventually missing linefeeds. In NotePad++ you would have to select Display all characters. An editor just adds missing line feeds to display the text. Eventually post your LPT1.asc.
NET USE LPT1 \\"printer name" has no meaning to vDos, expect if the final output goes (by the printer driver) to LPT1. That would however be a real roundabout. Forget about Windows NET USE.
Jos
|
|
|
Post by wtc on May 13, 2021 21:52:07 GMT 1
Hello,Jos, I examined both LPT1.asc and LPT1.txt on NotePad++ and both showed CR and LF at the end of every single line. Wayne
|
|
|
Post by Jos on May 13, 2021 22:00:45 GMT 1
Then post the LPT1.asc file?
Jos
|
|
|
Post by wtc on May 13, 2021 22:03:33 GMT 1
Here attached are the two files. Thank you, Jos.
Attachments:LPT1.asc (799 B)
LPT1.txt (1.55 KB)
|
|
|
Post by Jos on May 14, 2021 8:34:25 GMT 1
I downloaded _LPT1.asc and printed it by COPY _LPT1.asc LPT1 at the vDos command line. vDos1.pdf came out. _LPT1.asc starts with <ESC>+<SOH><ESC>5. In standard Epson escape codes this means: <ESC>+: Set n/360-inch line spacing <SOH>: Binary 1, 1/360" line spacing <ESC>5: Cancel italic font Could be those two code sequences have another meaning to the receipt printer. At least <ESC>+<SOH> interpreted as n/6-inch line spacing, or just 1 line spacing. Don’t know about <ESC>5. You could consult the documentation that comes with the printer. If I just remove these codes, vDos2.pdf is produced. Seems fine, except that it is (of course) printed on A4. Jos Attachments:vDos2.pdf (13.4 KB)
vDos1.pdf (13.33 KB)
|
|
|
Post by wtc on May 14, 2021 14:41:05 GMT 1
Thank you, Jos, Those first little bits of code are to kick the register draw open. I do see that your vDos1.pdf and vDos2.pdf are much larger files. What converted them to pdf? Wayne
|
|
|
Post by wtc on May 14, 2021 15:26:54 GMT 1
When I did COPY _LPT1.asc LPT1 , it printed out on my lpt1 printer, which is to say I didn't get a PDF.
|
|
|
Post by Jos on May 14, 2021 15:35:44 GMT 1
Wouldn’t have guessed that . PDF documents always introduce some overhead. While encoding the 1-byte ASCII characters to Unicode (at least) doubles the size of the content. Like #LPT1.txt (Unicode) is twice the size of #LPT1.asc (ASCII). The PDF’s were generated by a COPY of #LPT1.asc to LPT1 at the vDos command prompt. Then the virtual PDF printer NovaPDF was selected. But any virtual PDF printer will do. You would have to remove the SEL: option, then select a virtual PDF at the Select Printer Dialog. Or print for instance to LPT2 and set that accordingly. Jos
|
|
|
Post by wtc on May 14, 2021 20:58:05 GMT 1
Hello, Jos,
Let me ask for clarity's sake: when I typed in vDos
COPY _LPT1.asc LPT1
did I mistype something? I didn't seem to get a PDF. Should I add to vDos's config.txt the line
LPT1=NovaPDF TIO:1
? Do I have to download this NovaPDF or is it in my computer somewhere? Then, how do I get that to a printer? I would like that to be automated.
Wayne
|
|
|
Post by Jos on May 14, 2021 21:22:41 GMT 1
The forum software renamed #LPT1.asc to _LPT1.asc. So if you didn’t download your posted #LPT1.asc there will be no _LPT1.asc on your system. You would have to do a COPY #LPT1.asc LPT1. But (DOS) LPT1 will be set with SEL: “Generic…” RAW. Printing from your application, vDos generating a #LPT1.asc file, then copying that to LPT1 makes no sense.
One virtual PDF printer should already be installed: “Microsoft Print to PDF”. That’s extremely limited, eventually install for instance BullZip PDF printer. NovaPDF isn’t free and quite complex. Then set LPT1=TIO:1, so you can select the printer. You can extend that later to LPT1=SEL: "your_preselected_choice" TIO:1. The specific receipt printer codes will have to be omitted, or if supported by your app, a second DOS print device used w/o these codes.
Jos
|
|
|
Post by wtc on May 14, 2021 22:08:25 GMT 1
Hi Jos, When I added to config.txt LPT1=TIO:1 I get a PDF that I have attached to this reply:
|
|
|
Post by Jos on May 15, 2021 7:11:44 GMT 1
Seems ok.
The printer output will still start with: <ESC>+: Set n/360-inch line spacing <SOH>: Binary 1, 1/360" line spacing <ESC>5: Cancel italic font
Only the Epson receipt printer will interpreter that as to open the register draw. Instead of setting the line spacing and cancel italic.
Jos
|
|