Object reference not set to an instance of an object.
StackTrace:
at spr⭞.ᜁ(Graphics A_0, spr⭛ A_1, Boolean A_2, Boolean A_3)
at spr⭛.ᜀ(String A_0, spr⮾ A_1, String A_2, Boolean A_3)
at spr⭛.ᜀ(String[] A_0, String A_1)
at spr⭛.ᜀ(spr⯁ A_0)
at spr⭛.()
at spr⭛.ᜍ(Boolean A_0)
at spr⯐.ᜀ(Graphics A_0, spr⯀ A_1, spr⭛ A_2)
at spr⭛.ᜂ(String[] A_0)
at spr⭛.ᜀ(spr⯁ A_0)
at spr⭛.()
at spr⭛.ᜍ(Boolean A_0)
at sprᣫ.ᜀ(Graphics A_0, spr⭒ A_1, spr⯀ A_2, spr⯂ A_3, Image A_4)
at Spire.Pdf.PdfDocument.ᜂ(Object A_0)
at Spire.Pdf.PdfDocument.ᜁ(Object A_0)
at System.Drawing.Printing.PrintDocument.OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
doc.LoadFromBytes(System.IO.File.ReadAllBytes(file));
doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape;
System.Drawing.Printing.PrintDocument printDoc = doc.PrintDocument;
if (printerSettings != null)
{
printDoc.PrinterSettings = printerSettings;
}
printDoc.Print();
I am not able to attach the PDF file as it is 5MB & 15 MB- the file attachments to the support forum are limited to 2 MB