Exemplo n.º 1
0
 public override void OnSelectedPrinterChanged(PrintQueue printQueue)
 {
     if (printQueue.Name.Contains("Microsoft Print to PDF"))
     {
         List <string> j = PageSizeOptions.Select(c => c.PageSizeName).ToList();
         if (!(j.Contains("Ansi B")))
         {
             PageSizeOptions.Add(new Syncfusion.Windows.Controls.Printing.PrintPageSize()
             {
                 PageSizeName = "Ansi B", Size = new Size(1055, 1632)
             });
         }
         if (!(j.Contains("Ansi C")))
         {
             PageSizeOptions.Add(new Syncfusion.Windows.Controls.Printing.PrintPageSize()
             {
                 PageSizeName = "Ansi C", Size = new Size(1632, 2112)
             });
         }
         if (!(j.Contains("Ansi D")))
         {
             PageSizeOptions.Add(new Syncfusion.Windows.Controls.Printing.PrintPageSize()
             {
                 PageSizeName = "Ansi D", Size = new Size(2112, 3264)
             });
         }
         if (!(j.Contains("A0")))
         {
             PageSizeOptions.Add(new Syncfusion.Windows.Controls.Printing.PrintPageSize()
             {
                 PageSizeName = "A0", Size = new Size(3179, 4494)
             });
         }
     }
 }
Exemplo n.º 2
0
        private void GetPageSizes(Boolean init)
        {
            for (int i = 1; i < 6; i++)
            {
                PageSizeOptions.Add(i * 10);
            }

            if (init)
            {
                PageSize = PageSizeOptions.First();
            }
        }
Exemplo n.º 3
0
 public void ChangePageSize(int pageSize)
 {
     PageSize = pageSize;
     PageSizeOptions.Clear();
     PageSizeOptions.Add(new MatPageSizeOption(PageSize));
 }