Sending Graphics to a Printer

How do you send graphics (i.e. not ascii characters) to the printer? Preferably for free. DOS Borland C++.
Adrian031197Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LucHoltkampCommented:
Which printer?
0
Adrian031197Author Commented:
My printer is a Canon BJC-4550, but a generic method would be nice.
0
RONSLOWCommented:
At DOS level there is no generic level - because there is no printer graphics support.  You would have to generate the right codes for your printer.  Other than that, buy/find a graphics library for DOS.

If it is line drawings you want, try generating HPGL codes - there is a sharewaare utility called PrintGL which will ouput HPGL drawings to printer or screen.

Even better, use Windows instead (if possible) as it lets your create a graphic "windows" for a printer, so you can draw on a printer just like the screen.

0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

AVaulinCommented:
Use PCX Toolkit by Genus Microprograming Inc. There are functions to print graphics in this library. Moreover there are many other useful functions in it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Adrian031197Author Commented:
Where do I get it, and how much does it cost?
0
AVaulinCommented:
It cost $175. You can find it at http://www.provantage.com/CO__GNUS.HTM
0
Adrian031197Author Commented:
So it's a whole lot easier to print from Windows than DOS?
0
RONSLOWCommented:
Printing graphics is easy from Windows (well, as easy as graphics are on the screen) - what you see is what you print.

Outputing text in windows is not as simple (in terms of lines of code) as DSO, but is much more powerful and flexible.

Windows is a different kettle of fish to DOS - a bit like comparing C++ to assembler.  It provides a very rich environment for both users and developers.  There is a learning curve when going from a simplistic OS like DOS to a messaging (almost object -oriented) system like Windows.  But it is well worth the effort - especially if you do the sensible thing (if possible) and forget about Windows 3.1 and go to Win32 (ie. Windows 95/NT).  
Win32 is even richer and more stable than Windows 3.1 and is really easier.  This is because it is a complete operating system on its own (doesn't live on top of DOS) and is 32 bit and virtual (so no medium models and 640K limits etc.)

If I was going to spend some money, I'd spend it on moving to Win32 development tools, rather than on DOS.  Of course, your cicumstances may not allow this.

0
AVaulinCommented:
There are functions pcxBufferPrint, pcxFilePrint and other in PCX Toolkit which very easy to use. But as RONSLOW said Windows (especially Win95/NT) do most job with graphics instead you. But your first question was about DOS. PCX Toolkit is one the best toolkit which help you do what you want under DOS.
0
Adrian031197Author Commented:
Well then, is there a freeware or similar toolkit? And what is the best way to do Windows (3.1 or 32) programming?
0
AVaulinCommented:
I'm sure that there is free code which do what you want (but I don't know where). About programming platform: you must decide what platform you want use. Win is very popular in whole world. Many companies chose Win'95. I use and recommend Win'95 and VC++ and of course 32-bit programming (there are many advantages to choose 32-bit, you can learn about them from any book).
Good luck.
0
Adrian031197Author Commented:
How much does it (I guess VC++ is Visual C++) cost? Is it harder than DOS programming?
0
RONSLOWCommented:
Check with your local retailer about code.  You may be able to get the educational version which is cheaper.

VC++ is Visual C++ which is now also part of the Visual Tools suite.  If you just want C++ then get VC 5; if you want other languages then get the Visual Tools suite.

Unless you are developing client/server applications or major web-based apps, the professional version is OK - no need for enterprise version.

Windows programming without C++ is not as easy as dos, because it has a larger API and is an event driven  message based system, so you need to change the way you think of programs.  A simple Hello-World program in windows is several pages long because of the house-keeping you need to do to set up windows and start applications.

However, with VC++ and MFC, most of this is hidden from you, the API is encapulated into classes to make it more palettable, and VC will write the skelton application for you and help you fill in the details.

The VC++ development environment is really nice and well intergrated.  It's a joy to develop programs.  It includes browsers and integrated debugging and help and lots of nice goodies.

Of course, if you want, you can still write what is called "console mode" applications, which are pretty much like good old DOS applications, but are 32-bit and you have access to most of the Win32 API functions for file system, etc etc.  However, you cannot (easily) do graphics in a console mode app.  But, if you don't like event driven program and just want to write a (literally) ten line program, then that is still possible under Win32.

Unless there is some really good reason why you have to support DOS and/or Win 3.1, I'd forget about that platform and go 32-bit Win32 ASAP.  Of course, if you have a graphical application, then you will need to re-write your graphics to fit into the Win32 system.  If your application is more file or text based, then it shouldn't be too hard to make it work in Win32, either as a console mode app, or slotting the appropriate parts into a VC generated Win32 skeleton app.

Good luck !!
0
AVaulinCommented:
I can only sign under RONSLOW words.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.