How to print PDF files via Microsoft Edge in C#?
How to print PDF files via Microsoft Edge in C#?
Student
Skilled in SEO, content writing, and digital marketing. Completed several years of working in many organizations including multinational companies. I love to learn new things in life that keep me motivated.
As of my last knowledge update in September 2021, Microsoft Edge did not provide a direct API for programmatically printing PDF files from a C# application. However, you could use a workaround by launching Microsoft Edge with the PDF file's URL and then letting the user interact with the browser to print the PDF manually. Here's how you can do it:
In this code:
Please note that this approach relies on the user manually interacting with Microsoft Edge to print the PDF. There is no direct programmatic way to trigger printing from C# code using Microsoft Edge's API.
Additionally, the availability and behavior of this method might change with updates to Microsoft Edge. Always check the latest documentation and APIs provided by Microsoft if you need more advanced control over printing PDFs from your C# application.