Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Printing from DB and DBPro

Author
Message
GCEclipse
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: United Kingdom
Posted: 29th Sep 2002 05:41
Hi,

Not really sure which area to put this topic in but I hope you'll forgive me as this seems to be an oft requested thing. I've written a DLL which enables you to print from DB and DBPro. At the moment its only text output but I think I see how to make it print images too. More on that when I have the time...

Anyway the link to the DLL and DBPro text file is here.
http://www.eclipsedevelopment.co.uk/PrinterDLL.zip

To use it you must first Load the DLL:

Load Dll "DBPrinter.Dll",1

Then initialise the printer and bring up the printer dialog box:

Call Dll 1,"_PrinterSetup"

Then Start the print job:

Call Dll 1,"_StartPrintJob"

next send the text you want to print:

Call Dll 1,"_PrinterText","This is a test.","Arial",32,50,20

Syntax: Call Dll 1,"_PrinterText",Text$,Font$,FontSize,X,Y
where Text$ is the text you are sending, Font$ is the font you are using, Fontsize is obvious, X is the x co-ordinate on the page and Y is the Y co-ord on the page

You can do as many of these as you like. To finish the print and actually print it you:

Call Dll 1,"_EndPrintJob"


and thats pretty much it. I found on certain printers it seems to print really tiny and i'm not sure why but I'll look into it (it would be great if people that get ultra small output tell me what printer they have) but it seems to work anyway.

Please post comments and suggestions and problems...

Cheers

GC

Login to post a reply

Server time is: 2024-04-24 10:42:48
Your offset time is: 2024-04-24 10:42:48