71 lines
1.7 KiB
Plaintext
71 lines
1.7 KiB
Plaintext
compile function print_srp( BMP, PrintPath, PDFFilename ,PrinterInitialized, HideUI)
|
|
|
|
|
|
$insert logical
|
|
$insert msg_equates
|
|
$insert popup_equates
|
|
$insert oiprint_equates
|
|
|
|
EQU PI$LEFT TO 1
|
|
EQU PI$TOP TO 2
|
|
EQU PI$RIGHT TO 3
|
|
EQU PI$BOTTOM TO 4
|
|
EQU PI$WIDTH TO 5
|
|
EQU PI$HEIGHT TO 6
|
|
EQU PI$SIZE TO 7
|
|
|
|
declare function set_printer, get_printer, Printer_Select
|
|
|
|
If Assigned(HideUI) else HideUI = False$
|
|
If HideUI NE True$ then HideUI = False$
|
|
|
|
IF NOT(ASSIGNED(PrintPath)) THEN PrintPath = ''
|
|
IF NOT(ASSIGNED(PDFFileName)) THEN PDFFileName = ''
|
|
IF NOT(ASSIGNED(PrinterInitialized)) THEN PrinterInitialized = ''
|
|
|
|
IF NOT(PrinterInitialized) THEN
|
|
IF PrintPath = '' THEN
|
|
PrintPath = Printer_Select('',1) ;* Returns default printer path
|
|
END
|
|
|
|
* * * PRINT SETUP * * *
|
|
|
|
PageInfo = ''
|
|
PageInfo<PI$LEFT> = '0.25'
|
|
PageInfo<PI$TOP> = '0.25'
|
|
PageInfo<PI$RIGHT> = '0.25'
|
|
PageInfo<PI$BOTTOM> = '0.25'
|
|
|
|
PageSetup = 0 ;* 1 = Landscape mode
|
|
|
|
PrintSetup = ''
|
|
PrintSetup<1,1> = '2' ;* Specific Location
|
|
PrintSetup<1,2> = '5' ;* Show Print and PDF, hide Print Setup
|
|
PrintSetup<1,3> = '0' ;* Show the printing window
|
|
PDFParms = 'Printing PDF Document':@FM: '' :@FM:'':@FM: ''
|
|
|
|
stat = Set_Printer( 'INIT', PDFParms, 'SRP',PageInfo,PageSetup , PrintSetup)
|
|
|
|
|
|
stat = set_printer("BMP", BMP, 0:@fm:0:@fm:7.5:@fm:10, 0, 0 )
|
|
|
|
stat = Set_Printer( 'TERM' )
|
|
|
|
END ELSE
|
|
|
|
stat = Set_Printer('PAGEBREAK')
|
|
font = 'Arial'
|
|
font<2> = '18' ;* Big type
|
|
font<4> = 1 ;* Bold on
|
|
font<5> = 1 ;* Italics
|
|
|
|
|
|
stat = Set_Printer('TEXTXY','SRP Data',3.05:@FM:-0.80,font,0)
|
|
stat = set_printer("BMP", BMP, 0:@fm:0:@fm:7.5:@fm:10, 0, 0 )
|
|
|
|
END
|
|
|
|
RETURN ''
|
|
|
|
|