When clicking the print button there is no printing action
-
- Posts: 4
- Joined: Sat Aug 02, 2025 12:23 am
When clicking the print button there is no printing action
Using the demo project, I found that the print option is not running.
-
- Posts: 999
- Joined: Tue Sep 07, 2021 10:11 am
Re: When clicking the print button there is no printing action
Hello,
Please read the following article about printing in Avalonia:
https://www.stimulsoft.com/en/blog/arti ... s-avalonia
Thank you.
Please read the following article about printing in Avalonia:
https://www.stimulsoft.com/en/blog/arti ... s-avalonia
Thank you.
-
- Posts: 4
- Joined: Sat Aug 02, 2025 12:23 am
Re: When clicking the print button there is no printing action
Important!
Keep in mind a particular characteristic of Windows OS: after printing, the document itself is closed in the application, but the application may remain open. This behavior can’t be influenced from our side.
I need to print directly (Windows) to a local or network printer where I have the printer name, and this must be done silently. Could you help me?
-
- Posts: 999
- Joined: Tue Sep 07, 2021 10:11 am
Re: When clicking the print button there is no printing action
Hello,
Unfortunately, as we mentioned earlier in the article, Avalonia does not have a direct print of the report.
As an option, you can export the report to PDF and then print the exported file from the command line.
Thank you.
Unfortunately, as we mentioned earlier in the article, Avalonia does not have a direct print of the report.
As an option, you can export the report to PDF and then print the exported file from the command line.
Thank you.
-
- Posts: 4
- Joined: Sat Aug 02, 2025 12:23 am
Re: When clicking the print button there is no printing action
Could you help me with printing via the command line where I don't use the application?
-
- Posts: 999
- Joined: Tue Sep 07, 2021 10:11 am
Re: When clicking the print button there is no printing action
Hello,
You can try to use one of these methods:
1. Using Command Line with SumatraPDF (free, portable)
One of the simplest and most reliable methods.
Download SumatraPDF (a portable version is available).
Print command:
cmd
Example:
cmd
You can also use -print-to-default to send it to the default printer.
2. Using PowerShell
If Adobe Reader (or a similar program) is installed, you can invoke it via PowerShell:
powershell
Note: This only works if the PDF reader supports the PrintTo verb. Adobe Reader usually does.
3. Using the Print utility with a virtual PDF printer
If you want to send a PDF to a virtual printer (like Microsoft Print to PDF), you can try:
cmd
However, print only works with plain text files — not PDF. So this method is generally not recommended for PDFs.
Thank you.
You can try to use one of these methods:
1. Using Command Line with SumatraPDF (free, portable)
One of the simplest and most reliable methods.
Download SumatraPDF (a portable version is available).
Print command:
cmd
Code: Select all
SumatraPDF.exe -print-to "PrinterName" "path\to\file.pdf"
cmd
Code: Select all
SumatraPDF.exe -print-to "HP LaserJet P1005" "C:\docs\example.pdf"
2. Using PowerShell
If Adobe Reader (or a similar program) is installed, you can invoke it via PowerShell:
powershell
Code: Select all
Start-Process -FilePath "C:\docs\example.pdf" -Verb PrintTo -ArgumentList '"PrinterName"'
3. Using the Print utility with a virtual PDF printer
If you want to send a PDF to a virtual printer (like Microsoft Print to PDF), you can try:
cmd
Code: Select all
print /D:"\\PrinterName" "C:\docs\example.pdf"
Thank you.
-
- Posts: 4
- Joined: Sat Aug 02, 2025 12:23 am
-
- Posts: 999
- Joined: Tue Sep 07, 2021 10:11 am
Re: When clicking the print button there is no printing action
Hello.
We are always glad to help you.
Let us know if you need our help.
Thank you.
We are always glad to help you.
Let us know if you need our help.
Thank you.