Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing FORTRAN output 1

Status
Not open for further replies.

DoktorD

Nuclear
Jun 12, 2010
2
US
Hey there guys,

I'm actually making a suggested reorder program for my father's small business. I'm not a FORTRAN expert by any stretch of the imagination, but I had taken FORTRAN in college and was most comfortable with it out of any other programming language (as I really dont know much about any of the others).

I have my program basically done, but I was needing to know if there was any way to print the output to a local printer instead of to the terminal or to an output file..

I was told elsewhere that probably my only option would be to find a compiler that is capable of an option like that, however I dont know of any compilers for windows that allow something of that nature. Currently, I've been compiling with NagwareF95 and writing in F95.

It seems as though I'm striking out here.. I've had so much success with the program up until this point.. I was just kind of assuming that we just didnt cover something that advance (printing) in class and that I'd be able to google how to do it later on. I never gave it a thought that FORTRAN isn't capable of doing it within the code itself.

Thanks so much for any answers!

Mat
 
Replies continue below

Recommended for you

Which OS are you using? If Windows, 95, 98, ME, NT, 2K, XP, Vista or 7.

You can write directly to the printer on some of them.
 
johnhors,
Thanks for the info on Silverfrost! I've been able to make a little bit of headway with it, but it's still a little on the confusing side. It's definitely an option.

xwb,
This program is being written for use on a Windows XP machine.
 
Printing directly to the printer from XP isn't that easy. If the OS has the printer, you need to somehow disable that. It is a shared resource and the OS doesn't like sharing. It is like the tradesman who won't give away secrets - tell him what you want and he'll do it but he won't tell you how to he did it.

Gone are the days when you could write directly to the parallel port and sending an A and a carriage return gave you an A on the printer. Also, it depends on the type of printer. Most printers nowadays have their own language. Whenever you change printers, even if it is from the same manufacturer, it may have a different language. eg HP has PCL5 or HPGL or PCL6. Some won't even start printing until they've been given a page feed. Some will accept intermediate languages like Postscript or PDF.

If you've figured out how to layout the page and what the raw data going to the printer looks like, the printer API is in
Silverfrost has a facility for pulling in programs written in other languages (look for DLLExport or DLLImport). It isn't the 2003 standard but it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top