Back to Contents Previous Next
12. Printing
FNwimp_pdriverpresent
Checks to see if a printer driver is loaded.
Returns TRUE (-1) if a printer driver is loaded, or FALSE (0) if not.
(Note difference from usual Dr Wimp practice of returning 1 or 0)
FNwimp_getpdrivername
If a printer driver is loaded, the name of the printer driver is returned.
Check to make sure one is loaded first, with FNwimp_pdriverpresent.
PROCwimp_declarefont(font$)
Declares a font for printing. (Intended to be used within PROCuser_declarefonts)
font$ = name of font to declare, period separated e.g. “Trinity.Medium”.
PROCwimp_declarefonth(font%)
Declares a font for printing using font handle. (Intended to be used within PROCuser_declarefonts)
font% = handle of font to declare.
PROCwimp_declaredfilefonts(dfile%)
Declares the fonts used in a drawfile (especially) for postscript printing. (Intended to be used within PROCuser_declarefonts)
dfile% = handle of drawfile to be printed, which must have been loaded using FNwimp_loaddfile.
FNwimp_getpapersize(side%,type%)
Returns various information about the current paper size set up in loaded printer driver - in OS units.
If side%=0 then a horizontal measurement is returned.
If side%=1 then a vertical measurement is returned.
Which measurement is determined by type%.
If type%=0 then the width or height is returned.
If type%=1 then the left or bottom margin is returned.
If type%=2 then the printable width or printable height is returned.
If type%=3 then the right or top margin is returned.
FNwimp_papertoscreen(window%,coord%,side%,orient%)
Converts a paper x or y coordinate to a screen x or y coordinate - all in OS units.
window% = handle of window whose work area to use.
(A window reference is needed because paper values are assumed to map to positions in a window - Section 2.22.)
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is returned.
If orient%=0 then page is portrait.
If orient%=1 then page is landscape.
FNwimp_papertowork(coord%,side%,orient%)
Converts a paper x or y coordinate to a work area x or y coordinate - all in OS units.
(Paper values are assumed to map to positions in a window. Hence x values are the same and y values only referenced to different corner.)
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is returned.
If orient%=0 then page is portrait. If orient%=1 then page is landscape.
FNwimp_screentopaper(window%,coord%,side%,orient%)
Converts a screen x or y coordinate to a paper x or y coordinate - all
in OS units.
(A window reference is needed because paper values are assumed to map to positions in a window - Section 2.22.)
window% = handle of window whose work area to use.
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is returned.
If orient%=0 then page is portrait.
If orient%=1 then page is landscape.
FNwimp_worktopaper(coord%,side%,orient%)
Converts a work area x or y coordinate to a paper x or y coordinate -
all in OS units.
(Paper values are assumed to map to positions in a window. Hence x values are the same and y values only referenced to different corner.)
coord% = coordinate (x or y).
If side%=0 then coord% is a x coordinate, and an x coordinate is returned.
If side%=1 then coord% is a y coordinate, and a y coordinate is returned.
If orient%=0 then page is portrait. If orient%=1 then page is landscape.
PROCwimp_print(user%,window%,fpage%,lpage%,persheet%,interval%,-copies%,orient%,xscale,yscale,order%,invert%)
Initiates printing of a document.
If user%=0 PROCuser_redraw is called to draw the pages (with printing% set to TRUE and the clipping rectangle set to the page coordinates).
If user%=1 PROCuser_print is called to draw the pages, with the clipping rectangle set to the page coordinates.
window% = handle of window to redraw if user%=0.
fpage% = page number of first page to print.
lpage% = page number of last page to print.
persheet% = number of pages to fit onto the sheet of paper. Can be
1, 2 or 4. (If 2 then page is rotated sideways and reduced to 70% before applying xscale/yscale values. If 4 then page is reduced to 50% before applying xscale/yscale values.)
interval% = allows pages in a sequence to be skipped. 1 means everypage to be printed; 2 means every other page, etc. (E.g. allows odd oreven pages to be printed.)
copies% = number of copies of each page to print.
If orient%=0 then page is portrait.
If orient%=1 then page is landscape.
xscale/yscale scale the printed output in the x/y directions independently. Values <1 reduce the size, values >1 increase the size. A value of 1 means no change in size. (There is a lower limit of 0.05.)
order% applies only when persheet% is 2 or 4. If order%=0 the ‘pages’ are in the normal positions on the paper sheet. If order%=1 the positions of the ‘pages’ are altered.
If invert%=0 the printed output is normal; if 1 the printed output is upside-down.
(See Section 2.22 for full details.)
PROCwimp_sendfiletoprinter(filepath$)
Sends the named file directly to the currently configured printer.
Has same effect as dragging the file to the printer icon on the iconbar.
filepath$ = full pathname of file.
If delete% is not 0, the file will be deleted after being sent to the printer.
(Also listed under Section 3.1 Miscellaneous)
Top of page Back to Contents Previous Next