locked
How access multiple printers via coding RRS feed

  • Question

  • User1827380138 posted

    Good evening All,

    In my application i have two types of printing formats 

    one was A4 and another is 3Inch.  so i Use Two different types print.

    how to access this printer from coding..

    ex: I have 2 types of Products 

    Mobile and charger

    when i click mobile it was A4 printer

    And Charger is 3inch printer

    Please help me to how to do this on ASP.net 

    Thank you

       

    Wednesday, February 19, 2020 9:58 AM

All replies

  • User-1330468790 posted

    Hi, Dhoni,

     

    If I understand right, are you trying to access the printer of the client side since printing is a client-side activity. 

    You can not access CLIENT side printer from the SERVER side. If this was possible, it would risk that the harmful website link to your printer and print garbage to you.

     

    I think you are transferring code from winform to webform. 

     

    Windows forms: 

    They are client side so that they have the access to local printers on the client.

     

    Web forms: 

    The code are executed on the SERVER that a print call will be executed from the SERVER machine. 

    To control the printing activity, the server pass the page with javascript function window.print(), which could be bound to a button event inside the page. 

    That way, the client side could set the property of the printing and complete the printing stuff.

     

    Hope this can help you.

    Best regards,

    Sean

    Thursday, February 20, 2020 12:28 PM