Asp.Net, MVC - C# print from a web browser, off one record to two PDF's and 2 local printers - Ideas?

Kittykat 20 Reputation points
2023-10-18T21:57:31.1733333+00:00

Is there any solutions to print from a web browser, off one record to two PDF's and 2 local printers.  (1 being a printer the other a label printer) using ASP.NET, C# - Just looking for ideas.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,342 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,432 questions
0 comments No comments
{count} votes

Accepted answer
  1. Lan Huang-MSFT 27,151 Reputation points Microsoft Vendor
    2023-10-19T02:49:21.8166667+00:00

    Hi @Kittykat,

    If you're trying to do this in an ASP.NET application, I don't think it's the right choice.

    In ASP.NET you don't print anything, the user prints it. You can only open the print dialog box.

    Maybe you could choose a desktop application to try, such as Windows Forms or WPF.

    How to: Choose the Printers Attached to a User's Computer in Windows Forms

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 58,846 Reputation points
    2023-10-19T16:53:46.8333333+00:00

    To print a pdf file from the browser you need to load the pdf into a window and the user selects print and picks the printer.

    To print 2 pdf file, you need to open two windows. The server can not does, the client must. You can write JavaScript that clicks on two anchor links.