Results 1 to 6 of 6

Thread: Print doesn't work

  1. #1
    Fanatic Member
    Join Date
    Feb 00
    Location
    Dunmow,Essex,England
    Posts
    892

    Print doesn't work

    Hi All,

    I have been handed a program written by someone else, that has been deployed and doesn't work correctly after deployment.

    Basically we have a button with the following:

    Code:
    protected void btnPrint_Click(object sender, EventArgs e)
            {
                using (PrintDocument pd = new PrintDocument())
                {
                    pd.PrintPage += new PrintPageEventHandler(printPage);
                    pd.Print();
                }
            }
    in Dev the print button works everytime. I noticed that this references System.Drawing and that wasn't being deployed as part of the solution. I changed this so that this dll gets deployed as part of the solution into the bin folder for the app, however it has made no difference.

    Anybody any ideas?

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,731

    Re: Print doesn't work

    Hello,

    Just to confirm, are you expecting that this Print function will print to a printer that is connected to the client machine, or a printer that is connected to the server machine?

    Gary

  3. #3
    Fanatic Member
    Join Date
    Feb 00
    Location
    Dunmow,Essex,England
    Posts
    892

    Re: Print doesn't work

    It's a printer on the network. I thought it might be a permissions thing, but If the user presses the standard print button on the browser, then the page will print to the designated printer.

    Even in the Dev environment where I can get it to print it's a network printer.

  4. #4
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,731

    Re: Print doesn't work

    It could still be permission based.

    Does the identity that is running the Application Pool in IIS for your site, have access to, and can connect to the printer in question?

    Gary

  5. #5
    Fanatic Member
    Join Date
    Feb 00
    Location
    Dunmow,Essex,England
    Posts
    892

    Re: Print doesn't work

    After speaking with Ops, it appears that development are on network printers, but the users where the printers do not work are local. I'm wondering if they need to be opened up for sharing at a local level

  6. #6
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 04
    Location
    The Granite City
    Posts
    21,731

    Re: Print doesn't work

    Ah, that could well be it, yes.

    Gary

Posting Permissions

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