System.Drawing.Common is used in Spire.PDF. I have not included this in the project references.
I could not understand what to do at this stage. All the DLLs I use are compatible with .net standard or .netCore. Also i am not getting any errors in windows either.How can i solve the problem?
- Code: Select all
private static MBase innerPrintPdfDocument(PdfDocument pdf, Parameters parameters)
{
try
{
pdf.PrintSettings.PrinterName = parameters.PrinterName;
pdf.PrintSettings.Landscape = parameters.IsLandscape;
pdf.PrintSettings.Copies = parameters.NumberOfCopies;
pdf.PrintSettings.Collate = parameters.Collate;
pdf.PrintSettings.SelectSinglePageLayout();
pdf.Print();
pdf.Dispose();
return new MSuccess();
}
catch (Exception ex)
{
return new MError(string.IsNullOrEmpty(ex.Message) ? ex.InnerException.Message : ex.Message, ((int)EErrorCode.Exception).ToString());
}
}