Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sending Graphics to a Printer

Posted on 1997-06-30
14
Medium Priority
?
243 Views
Last Modified: 2010-04-10
How do you send graphics (i.e. not ascii characters) to the printer? Preferably for free. DOS Borland C++.
0
Comment
Question by:Adrian031197
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 3
  • +1
14 Comments
 
LVL 3

Expert Comment

by:LucHoltkamp
ID: 1164170
Which printer?
0
 

Author Comment

by:Adrian031197
ID: 1164171
My printer is a Canon BJC-4550, but a generic method would be nice.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1164172
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1164173
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
 

Author Comment

by:Adrian031197
ID: 1164174
Where do I get it, and how much does it cost?
0
 
LVL 4

Expert Comment

by:AVaulin
ID: 1164175
It cost $175. You can find it at http://www.provantage.com/CO__GNUS.HTM
0
 

Author Comment

by:Adrian031197
ID: 1164176
So it's a whole lot easier to print from Windows than DOS?
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1164177
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
 
LVL 4

Expert Comment

by:AVaulin
ID: 1164178
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
 

Author Comment

by:Adrian031197
ID: 1164179
Well then, is there a freeware or similar toolkit? And what is the best way to do Windows (3.1 or 32) programming?
0
 
LVL 4

Expert Comment

by:AVaulin
ID: 1164180
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
 

Author Comment

by:Adrian031197
ID: 1164181
How much does it (I guess VC++ is Visual C++) cost? Is it harder than DOS programming?
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1164182
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
 
LVL 4

Expert Comment

by:AVaulin
ID: 1164183
I can only sign under RONSLOW words.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question