Demo |
Top Previous |
This is a sample program that is included in this package, by analyzing it, you will be able to see how simple its is, and at the same time how powerful this new class is.
#include "dll.ch" #include "gra.ch" #include "xbp.ch" #include "common.ch" #include "xbpdev.ch" #pragma library("xppPDF1.lib") #pragma library("xppGRPDF.lib")
PROCEDURE MAIN
use parts
Grapdf := xbpGraPDF():New() GraPDF:Create() GraPDF:Page(XBPPRN_FORM_LETTER)
GraPDF:Box( {0, 0}, {2110,2710} )
GraPDF:Image( {10, 2500}, {2100, 2700}, "Logo.JPG", .f. )
GraPDF:LineWidth( 4 ) GraPDF:BoxColor( GRA_CLR_BLACK, GRA_CLR_PALEGRAY ) GraPDF:Box( {150, 2300}, {1950, 2500} ) GraPDF:TextColor( GRA_CLR_BLUE ) GraPDF:font( '14.Arial Bold' ) GraPDF:StringAt( {260, 2370}, "Parts Price List" ) GraPDF:StringAt( {1700,2370}, dtoc(date()) )
GraPDF:LineWidth( 1 ) GraPDF:BoxColor( GRA_CLR_BLACK, GRA_CLR_WHITE ) GraPDF:Box( {150, 700}, {1950, 2201} ) GraPDF:Line( {450, 700}, {450, 2200} ) GraPDF:Line( {1450, 700}, {1450, 2200} ) GraPDF:Line( {1700, 700}, {1700, 2200} )
GraPDF:TextColor( GRA_CLR_BLACK ) GraPDF:font( '10.Courier New' ) GraPDF:StringAt( {160, 2100}, "Prt Nmbr" ) GraPDF:StringAt( {460, 2100}, "Descricao" ) GraPDF:StringAt( {1460, 2100}, " Available" ) GraPDF:StringAt( {1710, 2100}, " Price" ) GraPDF:Line( {150, 2095}, {1950, 2095} )
go top line := 2040 do while .not. eof() GraPDF:StringAt( {160, line }, number ) GraPDF:StringAt( {460, line }, descrip ) GraPDF:StringAt( {1460, line }, transform( qt, '###,###') ) GraPDF:StringAt( {1710, line }, transform( price, '###,###.##') ) line = line - 50 skip enddo
GraPDF:LineWidth( 3 ) GraPDF:BoxColor( GRA_CLR_RED, GRA_CLR_PALEGRAY ) GraPDF:Box( {150, 250}, {1950, 550} ) GraPDF:TextColor( GRA_CLR_DARKBLUE ) GraPDF:font( '20.Courier New Bold' ) GraPDF:StringAt( {310, 450}, 'Demo Created by Softsupply Informatica' ) GraPDF:TextColor( GRA_CLR_BLACK ) GraPDF:font( '8.Courier New Italic' ) GraPDF:StringAt( {200, 360}, 'Contact :' ) GraPDF:StringAt( {200, 300}, 'eMail :' ) GraPDF:StringAt( {1400, 360}, 'Fone :' ) GraPDF:StringAt( {1400, 300}, 'Fax :' ) GraPDF:font( '12.Courier New' ) GraPDF:StringAt( {350, 360}, 'Edgar Borger' ) GraPDF:StringAt( {1550, 360}, '(5511) 3159-1997' ) GraPDF:StringAt( {1550, 300}, '(5511) 3255-5224' ) GraPDF:TextColor( GRA_CLR_BLUE ) GraPDF:StringAt( {350, 300}, 'eborger@terra.com.br' )
GraPDF:Preview()
return
|