Dear all,
some time ago I started a poll about what people are missing when it comes to REXX on OS/2|eCS.
One of the more frequently opted things was the lack for doing "pretty" prints from REXX, so to say graphics printing and stuff.
Now I have played a little with the printer object available in VisualAge Basic.
(I must admit that my knowledge of programming languages for use in OS/2|eCS is limited to REXX and COBOL, while my "sweet spot" actually is Visual Basic on Windoze... that's why I considered VABasic...)
Well, it seems like my assumptions on VABasic's capabilities were met so far - it basically supports everything needed... but before I start the real work, I wanted to see whether people are interested at all. Here's what I intend to do:
- a piece of software that takes a plain-text file as input
- this file contains both formatting and contents
- it processes these files and sends it to a printer
- freeware of course
- open-source perhaps (if someone else than me on this planet actually still uses VABasic for OS/2...)
To give you an example what would be feasible:
- define page sizes and orientation
- use and combine any available font on the system
- free formatting (set cursor to x/y)
- auto alignment (left/right/center) for a text string output
- basic graphics function (draw lines, circles, rectangles...)
- use bitmaps in print
A better example - the whole stuff in that text file would function as talking to a printer:
" this document is A4 sized, in portrait mode "
" margins are 2cm top, 1.5cm bottom, 2cm left, 1cm right "
" use Arioso 12pt bold; at x=4.2cm and y=2.1cm print 'Hello ' "
" now use Helvetica, 48pt, underlined and print 'World!' "
" now go to x=5cm, y=10cm; use TimesNewRoman 10pt "
" right-align and print 'This' + newline + 'is a' + newline + 'right-justified' + newline + 'text.' "
" at x=12cm,y=20cm print 'c:\mystuff\sample.bmp' with width=1cm, height=1cm"
" done "
Of course there will be a way of specifiying whether you want to use centi-/millimeters or inches as unit in your current doument. However, I still have to investigate if twips, inches, points and centimeters... are processed "correctly"...

Basically, this is more than enough to create documents like invoices and stuff...
As "advanced" features (perhaps at a later stage if enough interest is there) I could imagine things like forms and reports processing (using line templates, automatic loops, etc.).
As I said, it will not be a "DLL" usable from REXX but basically something batch-like. On the other hand, this would allow it to be used with almost anything since it only processes a pseudo page description. If someone with more experience than me tells me that it's possible to create DLLs with VABasic that can be loaded and used by REXX, I am more than willing to give it a try if he/she shows me hwo to do it.
Now for the drawbacks:
According to the readme, Visual Age for Basic has one serious limitation in its OS/2 version: There can be only 1 executable (created with VABasic) ran at given a time. This means that any other VABasic program will not run when there is already (or still) 1 VABasic program in memory.
(Holy moly, don't ask me why this is the case and how comes IBM released such a thing...)
Needless to say that VABasic seems to be unsupported abandonware. No fixes available AFAIK.
Another drawback is that "the crap" (sorry, ehh, Visual Age for Basic) will require a lot of runtime DLLs to work. But I don't consider this to be a huge problem, do you?
Finally:
I know there is Peter Kanis' print library still available (on Hobbes), but it seems to be abandonware (and shareware BTW) and IIRC "only" available for VX-REXX. If you ask yourself why I simply don't use OpenWatcom or WDSibyl or VAC++... the answer is: I don't know Pascal, Fortran, C or anything else you might consider more suitable. And yes - I could perhaps do it in NetREXX... but that would give us something running in JAVA. I doubt this could be used as a DLL for REXX... not to mention that Java isn't wuite my sweet spot either.

So, what do you think? Is that something "we" could make use of?
Let me know what you think. Feel free to bother with questions.
Alternate solutions:
All my attempts to find someone who could do this in any flavor of "C" were unsuccessful so far. That's why I decided to give it a try with VABasic. If YOU happen to be an OS/2 developer and you know how to create REXX-usable DLLs and how to interact with a printer object (component), I can give you more detailed specs on how the stuff is intended to function and would gladly help you in testing, documenting and whatever else I feel able to do. Write me if you're interested. Don't expect any kind of payment though - and be aware that it's something intended to be open-source (or freeware at least).
Cheers,
Thomas