TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Stephen Leake <[log in to unmask]>
Wed, 5 Sep 2001 18:45:22 -0400
text/plain (20 lines)
"EDUARDO HASBUN ." <[log in to unmask]> writes:

> I need to be able to set the output to a printer, in other words I want to
> print something in Ada 95 using my printer.  I'm using GNAT 3.13p in
> Windows.  Can someone help me??

This question is better suited to comp.lang.ada, since it is not an
Ada advocacy question.

The answer depends on what you want to print. If it is just text, you
can try using the printer's network name as a file name in
Text_IO.Open. If you want to draw lines and use fonts, you have to
access the Win32 GUI functions, via Windex or Claw or GtkAda, and
write to a printer device instead of a screen device.

Good luck!

-- Stephe