Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am having a PageLayoutControl with name: PageControl1. I used below codes for printing it:

public override void OnClick()
 {
                try
                {
                    PrintDialog printDiag = new PrintDialog();
                    DialogResult res = printDiag.ShowDialog();
                    if (res == DialogResult.Cancel)
                        return;

                    ESRI.ArcGIS.Output.IPaper paper = new ESRI.ArcGIS.Output.PaperClass();
                    paper.Attach(printDiag.PrinterSettings.GetHdevmode().ToInt32(), printDiag.PrinterSettings.GetHdevnames().ToInt32());
                    paper.Orientation = PageControl1.PageLayout .Page .Orientation ;
                    PageControl1.Printer.Paper = paper;
                    PageControl1.PrintPageLayout(1, 1, 0);

                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message , null, MessageBoxButtons .OK , MessageBoxIcon.Exclamation );
                }

 }

And I have another PageLayoutControl with name: PageControl2. Do you know how to print these PageLayoutControl on two sides of one paper (only one click printing button) ? (PageControl1 on the front side, PageControl2 on the back side) ?

Thanks and regards,

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.