Posted 17 September 2024, 9:58 am EST
                                
                                
                                    I set the CompatibilityMode to CrossPlatform. Now, the report looks ok and also the print via the AR print method looks good. However, when I print it with a print job to different printer trays, the output is pixeled.
SystemPrinter printer = new SystemPrinter();
printer.PrinterName = printerName;
printer.Copies = Convert.ToInt16(copies);
try
{
    printer.PrinterSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
    printer.StartJob(string.Format(CultureInfo.InvariantCulture, @"{0} {1}", LocalizedStrings.Planura, reportName));
    for (int i = 0; i < doc.Pages.Count; i++)
    {
        if (i < pageFrom - 1 || i > pageTo - 1)
        {
            continue;
        }
        float x = 0 - (printer.PrinterSettings.DefaultPageSettings.HardMarginX / 100);
        float y = 0 - (printer.PrinterSettings.DefaultPageSettings.HardMarginY / 100);
        System.Drawing.RectangleF rcPage = new System.Drawing.RectangleF(x, y, doc.Pages[i].Width, doc.Pages[i].Height);
        printer.PaperSource = this.GetPaperSourceForPage(printer.PrinterSettings, i + 1, this.currentPagePrintPageMapping, this.currentPrintConfiguration);
        printer.StartPage();
        doc.Pages[i].Draw(printer.Graphics, rcPage);
        printer.EndPage();
    }
    printer.EndJob();
}
catch (Exception ex)
{
    Debug.WriteLine(ex);
}
Any ideas why?