I have a forms process where it reads in a binary file and does the following logic:
osread form from d:\path\customer.frm
… processing occurs here …
print form:
In the OI_Precompiled code the print form: is translated into do_print(form, 1)
unfortunately, some of the data is stripped from form as the printer malfunctions. If howerver, I change the line to read:
oswrite form to "lpt1"
The form comes out without a problem. No if I can guarantee that all dot matrix printer will be at LPT1…
Is there a way in AREV32 to use the direct_print logic to send a binary stream to the printer? My suspicion is it is stripping char(0) characters.
Thanks,
John
Hi, John. Yes, you can define a direct-print printer in AREV32; in fact, that would be the default type of printer driver used for your printer definition. How did you set up your printer information in AREV32?
Thanks,
- Bryan Shumsky
Revelation Software
Hi Bryan,
It a little complicated. I already had a printer definition in the application. So I added a new column that defines which AREV32 printer environment to use (1-12). In this case the printer "mapped" to a local windows printer "Okidata 321". Normal reports come out just fine but this form has embedded char(0) so I think the Do_print is truncating the data. That is why oswrite worked.
How do I go about doing the direct print?
JOhn
Hi, John. Actually, I believe you already _are_ using the directprint driver; if you were using the OIPI driver, you'd have to have specified "OIPI" for the name of the physical printer when you set it up in AREV32. Another indication: if you are using OIPI, you'll see a print preview window rather than printing directly to the printer (do you?)
It's not just using directprint that you need; we need to tell directprint to act in 'binary' mode. Although it's not standard AREV, there's a new statement PRINTB that works like PRINT, except it outputs binary. Try changing your PRINT to PRINTB and see if that works?
Thanks,
- Bryan Shumsky
Revelation Software
Thank you, that is what I was lookiing for.
Bryan,
FWIW, I tried the PrintB logic and it does not work. I had to change it back to oswrite var to "LPT1"
John
Bryan,
I'm not sure if you looked at the PRINTB command since John reported it wasn't working for him, but I just tried it in OI 9.2.1 and it is working well for me. I was running into a similar problem where I needed to print regular PCL from within AREV32 and then print an image (that was already converted to PCL) in the middle of the print job. In the original AREV application the system would shell to DOS and copy the file to LPT1 but that no longer works reliably because of the network shares.
My first attempt was to use DirectPrint instead. This worked but doing so interfered with my existing Set_Printer settings of the original print job. I had a workaround but using PRINTB actually works even better for my purposes.