×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Printing FORTRAN output

Printing FORTRAN output

Printing FORTRAN output

(OP)
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

RE: Printing FORTRAN output

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.

RE: Printing FORTRAN output

(OP)
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.

RE: Printing FORTRAN output

Mat, it's really worth running through the basic tutorials and examples of silverfrost!


www.Roshaz.com

RE: Printing FORTRAN output

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 http://msdn.microsoft.com/en-us/library/dd162861(VS.85).aspx

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.   

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources