Results 1 to 10 of 10

Thread: Sending text direct to the printer. Is there a PrintDocument equivalent? *RESOLVED*

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982

    Sending text direct to the printer. Is there a PrintDocument equivalent? *RESOLVED*

    When writing windows applications you have the printDocument object to write code against and send it direct to the printer.

    Is there something similar in ASP.NET for web applications. I think there probably isn't as ASP.NET is server side.

    What I need it the user to press a button and send some text to the printer direct. The only way I can think is to dynamically create HTML and display it in a browser, the user prints from there but I would like it to go direct to the printer.

    Thanks
    Last edited by davidrobin; Sep 28th, 2004 at 07:57 AM.


    Things I do when I am bored: DotNetable

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    Unfortunately no.

    You must display what you want to print on screen using HTML and then this is printed.

    There are ways of getting the page to format for the printer using CSS2 - sometimes print friendly pages are used. Its a pain in the arse sometimes!

    DJ

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    Sorry for hijacking this post and the newbie question.

    What is CSS2?

  4. #4
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131
    There are a few CSS standards - started with CSS level 1 and 2 - level 3 is under development.

    You can view the standards at http://www.w3.org/Style/CSS/ just scroll down to CSS Specifications.

    HTH

    DJ

  5. #5
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    You could alternatively dynamically create a pdf, and they could print that.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    Now there is an idea.

    Any help on how I do that please.


    Things I do when I am bored: DotNetable

  7. #7
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Well, you could download the adobe sdk, but that would require more learning... I don't know your project specs or your deadline.

    Best thing to do, if this is an enterprise solution, is to just buy a 3rd party component...

    http://www.siberix.com/pdf/index.html

    For $200, that's a nice steal...

  8. #8
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    If you have VS.NET Enterprise or Enterprise Architect, then you can use Crystal Reports that comes with it. With it you can export your data in many different formats like PDF, Excel, Rich Text etc.

  9. #9
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Yea but then you have to use Crystal Reports... ACK!

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Oct 1999
    Location
    England
    Posts
    982
    Our pre VS.NET intranet had crystal reports but we had some initial problems with compatability.

    Fortunately now though we have Crystal Enterprise for out reports.


    Things I do when I am bored: DotNetable

Posting Permissions

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



Click Here to Expand Forum to Full Width