Overview |
This class was created to fill the need of Xbase++ users around the world, as noted by the many threads existing in the Xbase News Group about creating PDF output from Xbase++ applications. Several solutions have been presented, but none was a complete one, that could be deployed to customer installations without further steps, like PDF printer drivers, and so on.
This is a very simple class with very little effort in terms of programming, of course implementing it will require code changes, but the benefits are worth it.
An example of a simple program would be :
PROCEDURE MAIN
pdf := xbpPdf():New()
|
// Creates the PDF object
|
pdf:Create( “Hello.Pdf” )
|
// Tell the class the file name
|
pdf:NewPage()
|
// Page size (Clipper style)
|
pdf:Font( '10.Courier New' )
|
// Choose font
|
pdf:Text( 1, 1, "Hello World !" )
|
// write text
|
pdf:EndDoc()
|
// Close file and write to disk
|
return
As seen here, I use lines and columns in the old Clipper style, also known as TopDown witch should make things easier to users of TD or Express libraries.