vpxPrint TIPS

Last updated 07/04/2003

This page presents some useful vpxPrint tips.
Feel free to propose any additional tip that you have successfully used.

Prerequisite : vpxPrint is a print tool and offers a lot of DLL entry points that can be used to perform additional tasks.

1. Get the current
vp
xPrint version
Used to check if the current version is adequate for running.

{ xprint.i }

DEF VAR M AS MEMPTR NO-UNDO.
DEF VAR xVersion AS CHAR NO-UNDO.
SET-SIZE(M) = 128.

RUN xPrintVersion( M ).

xVersion = GET-STRING(M, 1).
SET-SIZE( M ) = 0.

MESSAGE xVersion VIEW-AS ALERT-BOX.

2. Convert image formats Transform an image from a format to another.

Program listing

3. Print a shadowed text A shadowed text. Frames are used, multi-lines texts are allowed.

The result can be achieved by writing the text two times with a shift. Two colors are used.

Program listing

General coding:
PUT STREAM O CONTROL "<UNITS=MM>"
       "<#1><R+10><C+60><FArial><P42><B><FRAME#1>"
       "<FGCOLOR=GRAY><USE#1>"
            myText
       "</USE><=#1><at=-1,-1><#1>"
       "<FGCOLOR=BLACK>"
       "<R+10><C+60><FRAME#1><USE#1>"
            myText.

4. Wordart Some examples of coding with colors, angles and shadows. Program listing
5. Create a FAX file When using a fax server different of DelrinaFax (DelrinaFax interface is native), you may want to create a compatible TIF file that your fax server accepts.

Note that you have to put the tif file in the Fax server Outbox directory and add a file giving recipients and other parameters. TIF files are multi-pages and 'Black and white'.

{ xprint.i}

OUTPUT TO c:\temp\IMAGE.xpr PAGED PAGE-SIZE 500
/* PUT CONTROL "<PREVIEW>". */ /* if needed */

PUT CONTROL "<PRINT=NO>". /* to avoid the printing */
PUT "<EXPORT=c:\temp\image.tif,BW>"
       "<R10><C10><P18><B>Hello world !".
PAGE.
PUT "<R10><C10>This short procedure" SKIP(1)
    "<C10>shows how to create a TIF file (2 pages)."

OUTPUT TO TERMINAL.
RUN printFile('c:\temp\IMAGE.xpr').

6. Adjust font size to a given area. In a given area, set the font size to print the full text centered inside.

Program listing.