replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Printing output to local printer
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing output to local printer

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
DoktorD



Joined: 13 Jun 2010
Posts: 2

PostPosted: Tue Jun 15, 2010 10:35 pm    Post subject: Printing output to local printer Reply with quote

Hey there guys,

I just downloaded SilverFrost and have been playing around with it only for a short time now.. I was pointed to it in my search for finding a way to printing my Fortran 95 output to a local laserjet printer as opposed to the terminal/screen/file.

I found two small discussions on the subject on this board already, but nothing that really gave me much information (as I have ZERO programming knowledge outside of Fortran 95).

However, I found a short blurb of code in the help section of Plato with the following code:

Code:


   WINAPP
      INTEGER i,winio@
      EXTERNAL test
      i=winio@('%sc','HTML_PRINTER_OPEN',7,test)
      END

      INTEGER FUNCTION test()
      WRITE(7,*)
      WRITE(7,*) "0123456789"
      WRITE(7,*)
      CLOSE(7)
      test=2
      END





Is there a way of changing the font size and such?

Perhaps even the best thing that I could learn to do is how to send a FILE to the printer.. I could very easily print my output to a file then create some code to print that file..

Like I said, I have NO experience with coding other than Fortran 95 so things like WINAPP, Clearwin, and things of that nature are totally foreign to me.. I'm not even 100% sure how this code is accessing the printer dialog box.

ANY help would be appreciated!!

Thanks!

Mat
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 506
Location: Sunderland

PostPosted: Wed Jun 16, 2010 12:23 pm    Post subject: Reply with quote

Hi Mat
Try this:
Code:

      WINAPP
      INTEGER i,winio@
      EXTERNAL test
      i=winio@('%sc','HTML_PRINTER_OPEN',7,test)
      END

      INTEGER FUNCTION test()
      WRITE(7,1000) '<p><font size="2" face="Verdana">'
      WRITE(7,1000) "0123456789 Size2 Verdana"
      WRITE(7,1000) '</font></p>'
      WRITE(7,1000) '<p><font size="3" face="Times">'
      WRITE(7,1000) "0123456789 Size3 Times"
      WRITE(7,1000) '</font></p>'
      WRITE(7,1000) '<p><font size="6" face="Arial">'
      WRITE(7,1000) "0123456789 Size6 Arial"
      WRITE(7,1000) '</font></p>'
 1000 format(a)
      CLOSE(7)
      test=2
      END



Regards
Ian
Back to top
View user's profile Send private message Send e-mail
DoktorD



Joined: 13 Jun 2010
Posts: 2

PostPosted: Wed Jun 16, 2010 3:29 pm    Post subject: Reply with quote

Ian,

Thanks for the response!

I compiled your code as is and this is the resulting printout:



The problem goes away when I substitute "HTML_PRINTER_OPEN" with "PRINTER_OPEN".

However, the output size is too large and I wont be able to get all of my output onto the page width wise.
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 506
Location: Sunderland

PostPosted: Wed Jun 16, 2010 6:38 pm    Post subject: Reply with quote

Perhaps you should use "size 1"

I use draw_characters@ and this can have scaling and rotation applied. You would need to write each line to a character variable and then output that variable. You also need to keep track of the position on the page and use a new_page@. I write my data to a file and then write it using the above technique.
Regards
Ian
Back to top
View user's profile Send private message Send e-mail
colt1954



Joined: 21 Dec 2010
Posts: 81

PostPosted: Thu Jun 21, 2012 2:38 pm    Post subject: Re: Reply with quote

IanLambley wrote:
Hi Mat
Try this:
Code:

      WINAPP
      INTEGER i,winio@
      EXTERNAL test
      i=winio@('%sc','HTML_PRINTER_OPEN',7,test)
      END

      INTEGER FUNCTION test()
      WRITE(7,1000) '<p><font size="2" face="Verdana">'
      WRITE(7,1000) "0123456789 Size2 Verdana"
      WRITE(7,1000) '</font></p>'
      WRITE(7,1000) '<p><font size="3" face="Times">'
      WRITE(7,1000) "0123456789 Size3 Times"
      WRITE(7,1000) '</font></p>'
      WRITE(7,1000) '<p><font size="6" face="Arial">'
      WRITE(7,1000) "0123456789 Size6 Arial"
      WRITE(7,1000) '</font></p>'
 1000 format(a)
      CLOSE(7)
      test=2
      END



Regards
Ian


Hi Ian so how would you do the above to get it to the screen or a file?
BTW i too had it print strangely it worked when I ditched HMTL form printer statement, but it only displayed the same font sizes it merely printed what was in the quotes..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group