Results 1 to 3 of 3

Thread: Show PDF AND print dialog

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Show PDF AND print dialog

    Is it possible. Currently i have an ashx handler file which is generating a PDF and writing it to the response stream.

    Is it possible to also include some javascript or similar to show the print dialog?

    Cheers for any help!
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Show PDF AND print dialog

    Hey,

    You can certainly call print using javascript, that is as simple as:

    Code:
    window.print();
    However, how you combine this with the response stream for your pdf, I am not quite sure.

    Gary

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Show PDF AND print dialog

    When streaming a file, you cannot send anything else along with it because that goes against the concept of the stream representing a resource.

    If you want the PDF printed, then embed it on a page in an iframe/object tag, and call print on that element.

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