Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    England, Hythe
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question printing a html page

    how do i get my server to write the contents of session oject and print it on a printer attached to the printer????


    thanks for the help

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You'd need a custom control to write a printer in ASP. Why not just use response.write to send it to the web page you're debugging. If you aren't debugging then write it to a text file or database and use some other job to print it from there. To enumerate the session variables use for each x in Session.

  • #3
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    404
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you are using VB, there are specific objects that are available in runtime apps, the Printer and Printers Objects. (Printers gives you information about all printers available on the system, the Printer object--nice if they could have named them a bit better--gives you information about the active printer like its name and controls all printer output)

    Code:
    Printer.Print "I am a tiny printed page, short and stout"
    But each Printer.Print line goes to a new line...

    Code:
    Printer.Print "I am a tiny printed page, short and stout"
    Printer.Print "You are not tiny, you wee git!"
    would literally be

    I am a tiny printed page, short and stout
    You are not tiny, you wee git!

    Printer.NewPage would give you a new page and Printer.EndDoc would end the printing.

    You can also specify the printer font name and other style elements, but it gets lengthy, so try here for a rundown: http://www.vbinformation.com/tut-prnt.htm

    Roy's right, Blue...it is often easier (in comparison) to do a printer friendly version rather than going straight to the printer...though a COM object can make it easier (if you are comfortable enough for it). And dotNet (dotSpew) does make it easier, though it has a complete lack of basic logic in some areas...

    Take a look at a few of these for some ideas that may give you some better insight:

    http://msdn.microsoft.com/library/de...rver033099.asp

    http://support.microsoft.com/default...EN-US;Q154078&
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    England, Hythe
    Posts
    207
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you for all the help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •