Without any external tool, one of the ways is with Windows.Data.Pdf (references to Windows.winmd and System.Runtime.WindowsRuntime.dll for WPF or Winforms), by converting each PDF page into an image (I tested with a BitmapImage for example, from PdfPage.RenderToStreamAsync),
then you can print each image silently on a printer with PrintDialog.PrintVisual or other method
How to print a pdf file directly to printer(silent printing) without using tools like adobe?
Subash
21
Reputation points
Hi,
I have an invoice pdf file in my local file system. I need to directly print it without showing any preview or dialog box(silent printing).
Note: Without using tools like adobe reader.
Thanks.
Developer technologies | Windows Presentation Foundation
2,856 questions
Developer technologies | C#
11,579 questions
2 answers
Sort by: Most helpful
-
Castorix31 90,686 Reputation points
2022-07-18T15:58:40.257+00:00 -
Bill Reiss 0 Reputation points Microsoft Employee
2023-12-01T16:46:51.1433333+00:00 I used FreeSpire.PDF in .NET MAUI on Windows, I don't see any reason why it wouldn't work in WPF. Details here: [http://billreiss.com/2023/12/01/printing-a-pdf-from-net-maui-windows-silently/]