Question with respect to Printing Published Map File (.pmf)

2710
0
07-06-2015 10:20 PM
Highlighted
New Contributor II

I am trying to print  .pmf file using print button but after executing the below code I am getting a blank page as a result.

If anybody can tell me what is wrong with the code shown below, Helpfull for me to proceed further.

private void btn_Print_Click(object sender, EventArgs e)

        {

     PrintDialog printDlg = new PrintDialog();

            PrintDocument printDoc = new PrintDocument();

            printDoc.DocumentName = "D:\\Project_Folder\\Soil_Units_PMF\\pmf\\KUM1_1G1b_Soilunits_Profile.pmf";

            printDlg.Document = printDoc;

            printDlg.AllowSelection = true;

            printDlg.AllowSomePages = true;

            //Call ShowDialog

            if (printDlg.ShowDialog() == DialogResult.OK)

            {

                        

                printDoc.Print();

                             

            }

            else

            {

                return;

            }

           

        }

Tags (1)
Reply
0 Kudos
0 Replies