Delphi/Pascal >> Print to a USB printer (newbie)

by Nektarios - Greece » Sat, 01 Jul 2006 15:43:36 GMT

I have a program that it does some math to calculate some real variables.
I want the user to press a button and print these values of these
variables with some info text as a string.
The printer might be connected to LPT or USB port.
I couldn't find anywhere some code about this.
Any help please ?


Example of print report :

Name of Application

Some text as string...

The results are :
A = 34.3445
B = 1,200
N = 1
K = 1.3452



Delphi/Pascal >> Print to a USB printer (newbie)

by Andreas Koch » Sat, 01 Jul 2006 16:01:29 GMT

Look up "printer" in the Delphi help, there should be
an example, too.

printer.canvas.textout(32,32,'The Results are...');

As long as the printer is installed and has a windows Driver " target="_top" rel="nofollow">[Driver Robot fixes your driver problems] (so you can
print to it from word etc. too), it doesn't matter if its connected to
LPT or USB or Network.

Similar Threads

1. convert a USB printer to a network printer?

Is there some kind of adapter I can buy which will allow me to take my
USB printer and use it as a network printer?

(A chickenhawk has been sacrificed to Allah)


-- exists as a runoff for unwanted posts in the
technical groups. Enforcement of rules is deliberately minimal but
Borland reserves the right to cancel posts at any time, for any
reason, without notice.

2. QR4 it takes area from printer predetermined when printing in another printer

3. Newbie - Printing to Zebra printer

I'm a newbie to .NET and Google.  I am trying to write a C#
application that prints a barcode label to a Zebra (thermal) printer. 
I am using the PrintDocument class (System.Drawing.Printing
namespace).  Though it prints to the printer, it only prints the
actual ZPL code (e.g. "^XA^LH05,...).  I've tried to switch to the
Generic /Text Only driver, but before it gets to my ZPL code, it
displays the error "The data area passed to a system call is too
small."  I noticed that I cannot even print a test page using this
driver.  I have W2K SP3.  I retrieved a pre-sp3 file and
tried swapping out the driver files that begin with TTY and UNI, but
that didn't work, either.

Can anyone help??


4. Necessity of printer friendly version link (was: newbie: how to create a print link)

6. newbie question: printer (2235c) from DTC to print server

7. MacBook - Newbie: Need help on printing to XP shared printer

MacBook - Newbie: Need help on printing to XP shared printer

Bear with me please. I read tons of articles on this but somehow as a
newbie to MAC, I am missing something. 10.5.2

Currently, I set the MACBOOK up so my friends daughter can print
directly if we plug in the HP Deskjet 5490 printer directly via USB to
the MACBook. No problem.

When we first got the MACBOOK I tried setting up the MACBOOK
wirelessly to recognize the workgroup where the printer was attached
via USB to the Windows XP PC. However it printed out garbage since I
did not know there was a difference between XP printing and MAC
(Gutenberg/gimp printing/drivers).

I now know there is a difference after reading a little.

But in reading various instructions I Googled, I no longer can find
how to connect the MAC to the Windows workgroup. Note we do have a
printer set up currently as USB-HP Deskjet on the Macbook (not sure I
need to delete it yet).

I went to System Preferences on MACBOOK and clicked on printers, more
printers. In the drop down box was CANON, APPLETALK, IP HP printing
and Firewire. There was no WINDOWS selection as I saw in other online
web instructions.

So not sure how to proceed to
1. Connect to workgroup (click on what exactly), step by step please!!
2. Add correct printer

Thanks so much in advance.

8. Newbie - Problem using printer through router with a built in print server