- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to user Win_print Direct to print to a USB
printer on an XP home system. (Visual Fortran 6.6). I have no problem writing records to XP system devices such as Zip Drive etc. After trying many approaches I
need some help in getting this part of the project going.
(I am working around this at the moment by writing output data to a file and then, using another language, printing the data.)
Is there a simplified "how to do it" source available?
Thanks,
Joe Young
printer on an XP home system. (Visual Fortran 6.6). I have no problem writing records to XP system devices such as Zip Drive etc. After trying many approaches I
need some help in getting this part of the project going.
(I am working around this at the moment by writing output data to a file and then, using another language, printing the data.)
Is there a simplified "how to do it" source available?
Thanks,
Joe Young
Link Copied
10 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WinPrintDirect is specifically for the case where you are printing to a device that uses embedded control characters to affect printing, rather than simply a bitmap rendering. Examples include PostScript printers and HP-GL plotters. If your printer is an ordinary bitmap-type printer, you would not use WinPrintDirect, but rather WinPrint.
An example of using WinPrintDirect for printing a PostScript file is:
An example of using WinPrint is provided in the CVF samples under MISCFORPRINT.
Steve
An example of using WinPrintDirect for printing a PostScript file is:
program forprint use Fortran_WinPrintDirect integer istat open (unit=1,file='doc.ps',form='formatted',status='old',action='read') istat = Print_Direct (1, Default_Printer=.FALSE.) close (1) end
An example of using WinPrint is provided in the CVF samples under MISCFORPRINT.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve. I appreciate your assistance.
Joe Young
Joe Young
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
You wrote: "An example of using WinPrint is provided in the CVF samples under MISCFORPRINT."
I have looked for over an hour and I cannot find this
information. I even checked my Visual Fortran distribution CD.
Do you have a URL where I can find the samples?
Thank you,
Joe Young
You wrote: "An example of using WinPrint is provided in the CVF samples under MISCFORPRINT."
I have looked for over an hour and I cannot find this
information. I even checked my Visual Fortran distribution CD.
Do you have a URL where I can find the samples?
Thank you,
Joe Young
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The source code for both WinPrint and WinPrintDirect is at http://compaq.com/fortran/examples The "sample program" for WinPrint is little more than the one I showed above with the module and routine name changed.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. I have it now.
Joe Young
Joe Young
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been playing with this for a few hours now and I am still missing something...probably something simple :) When I run the program I receive an error indicating that I have tried to use the WinPrint module
before it was declared as a module. If I comment out the
three lines that pertain to WinPrint the program runs fine. I have attached the code for this program.
Thanks,
Joe Young
before it was declared as a module. If I comment out the
three lines that pertain to WinPrint the program runs fine. I have attached the code for this program.
Thanks,
Joe Young
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have the source for the module after the use of it. Fortran requires that the module be "defined" before you use it. Either move the module to the beginning of the source file or, better, split the module into a separate source file in your project. If you are using the IDE, it will automatically get built first, otherwise you'll need to make sure it is compiled first.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for help. Have a good weekend.
Joe Young
Joe Young
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WinPrint is working now. Thanks for your help. What a
change in FORTRAN since the last I used (HP 4X). This is
great. Back to the books.
Joe Young
change in FORTRAN since the last I used (HP 4X). This is
great. Back to the books.
Joe Young
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I imagine that modern Fortran 95 code looks rather alien to someone used to FORTRAN IV.
I'm glad to hear that it works for you.
Steve
I'm glad to hear that it works for you.
Steve
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page