There are actually two reports that I will be printing.
One of the pdfs that is generated is a Label. This pdf prints very quickly.
The second PDF is more of an invoice. The report uses a 'Table' component to list out all of the items for an invoice.
The second PDF isn't that much bigger than the label, but it just won't print fast. It usually takes well over 5 minutes and the web application eventually just stops working.
There's nothing complicated with the code:
- Code: Select all
PdfDocument doc = new PdfDocument();
try
{
doc.LoadFromFile(_filePath);
doc.PrintSettings.PrinterName = _currentPrinter.PrinterName;
doc.Print();
_printingSuccessful = true;
}
I just take the file path to the pdf that is created, and send it to the named printer.
For the Label, this works perfectly. For the invoice......not so much.
Any thoughts?
I'm using the Freespire.PDF library from Nuget. This is running from a C# Blazor server application.
Any help would be appreciated!