{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "pdfviewer-multi-tabbed-viewer",
  "framework": "winforms",
  "type": "registry:component",
  "component": "PdfViewer",
  "variant": "multi-tabbed-viewer",
  "dependencies": [
    "Syncfusion.PdfViewer.Windows"
  ],
  "description": "Sample that hosts multiple PdfViewer instances inside a TabControl so users can open several PDFs side by side.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winforms/llms.txt",
    "skillPack": "syncfusion/winforms-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winforms/pdfviewer-multi-tabbed-viewer.md"
  },
  "files": [
    {
      "target": "src/components/pdfviewer-multi-tabbed-viewer/pdfviewer.Designer.cs",
      "content": "using Syncfusion.Windows.Forms;\nusing System.Drawing;\n\nnamespace MultiTabbedViewer\n{\n    partial class Form1\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.components = new System.ComponentModel.Container();\n            this.Tooltip = new System.Windows.Forms.ToolTip(this.components);\n            this.Tab1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv();\n            this.pdfDocumentView1 = new Syncfusion.Windows.Forms.PdfViewer.PdfDocumentView();\n            this.tabControlAdv1 = new Syncfusion.Windows.Forms.Tools.TabControlAdv();\n            this.Tab2 = new Syncfusion.Windows.Forms.Tools.TabPageAdv();\n            this.pdfDocumentView2 = new Syncfusion.Windows.Forms.PdfViewer.PdfDocumentView();\n            this.Tab3 = new Syncfusion.Windows.Forms.Tools.TabPageAdv();\n            this.pdfDocumentView3 = new Syncfusion.Windows.Forms.PdfViewer.PdfDocumentView();\n            this.toolStrip1 = new System.Windows.Forms.ToolStrip();\n            this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();\n            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\n            this.btnPrint = new System.Windows.Forms.ToolStripButton();\n            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\n            this.btnGoToFirstPage = new System.Windows.Forms.ToolStripButton();\n            this.btnGoToPreviousPage = new System.Windows.Forms.ToolStripButton();\n            this.txtCurrentPageIndex = new System.Windows.Forms.ToolStripTextBox();\n            this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();\n            this.lblTotalPageCount = new System.Windows.Forms.ToolStripLabel();\n            this.btnGoToNextPage = new System.Windows.Forms.ToolStripButton();\n            this.btnGoToLastPage = new System.Windows.Forms.ToolStripButton();\n            this.toolStripButton3 = new System.Windows.Forms.ToolStripSeparator();\n            this.btnZoomIn = new System.Windows.Forms.ToolStripButton();\n            this.btnZoomOut = new System.Windows.Forms.ToolStripButton();\n            this.cmbCurrentZoomLevel = new System.Windows.Forms.ToolStripComboBox();\n            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();\n            this.FitPage = new System.Windows.Forms.ToolStripButton();\n            this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();\n            this.FitWidth = new System.Windows.Forms.ToolStripButton();\n            this.Tab1.SuspendLayout();\n            ((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).BeginInit();\n            this.tabControlAdv1.SuspendLayout();\n            this.Tab2.SuspendLayout();\n            this.Tab3.SuspendLayout();\n            this.toolStrip1.SuspendLayout();\n            this.SuspendLayout();\n            //\n            // Tab1\n            //\n            this.Tab1.Controls.Add(this.pdfDocumentView1);\n            this.Tab1.Image = null;\n            this.Tab1.ImageSize = new System.Drawing.Size(16, 16);\n            this.Tab1.Location = new System.Drawing.Point(3, 33);\n            this.Tab1.Name = \"Tab1\";\n            this.Tab1.Size = new System.Drawing.Size(626, 324);\n            this.Tab1.TabIndex = 1;\n            this.Tab1.Text = \"DataSheet.pdf\";\n            this.Tab1.ThemesEnabled = true;\n            this.Tooltip.SetToolTip(this.Tab1, \"hello\");\n            //\n            // pdfDocumentView1\n            //\n            this.pdfDocumentView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));\n            this.pdfDocumentView1.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.pdfDocumentView1.Location = new System.Drawing.Point(0, 0);\n            this.pdfDocumentView1.Name = \"pdfDocumentView1\";\n            this.pdfDocumentView1.Size = new System.Drawing.Size(626, 324);\n            this.pdfDocumentView1.TabIndex = 0;\n            this.pdfDocumentView1.Text = \"pdfDocumentView1\";\n            //\n            // tabControlAdv1\n            //\n            this.tabControlAdv1.Controls.Add(this.Tab1);\n            this.tabControlAdv1.Controls.Add(this.Tab2);\n            this.tabControlAdv1.Controls.Add(this.Tab3);\n            this.tabControlAdv1.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.tabControlAdv1.Location = new System.Drawing.Point(0, 25);\n            this.tabControlAdv1.Name = \"tabControlAdv1\";\n            this.tabControlAdv1.ShowTabCloseButton = true;\n            this.tabControlAdv1.Size = new System.Drawing.Size(633, 361);\n            this.tabControlAdv1.TabIndex = 3;\n            this.tabControlAdv1.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.TabRendererVS2008);\n            this.tabControlAdv1.ThemesEnabled = true;\n            this.tabControlAdv1.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.tabControlAdv1_ControlRemoved);\n            this.tabControlAdv1.Click += new System.EventHandler(this.tabControlAdv1_Click);\n            //\n            // Tab2\n            //\n            this.Tab2.Controls.Add(this.pdfDocumentView2);\n            this.Tab2.Image = null;\n            this.Tab2.ImageSize = new System.Drawing.Size(16, 16);\n            this.Tab2.Location = new System.Drawing.Point(3, 33);\n            this.Tab2.Name = \"Tab2\";\n            this.Tab2.Size = new System.Drawing.Size(626, 324);\n            this.Tab2.TabIndex = 2;\n            this.Tab2.Text = \"SimpleTable.pdf\";\n            this.Tab2.ThemesEnabled = true;\n            //\n            // pdfDocumentView2\n            //\n            this.pdfDocumentView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));\n            this.pdfDocumentView2.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.pdfDocumentView2.Location = new System.Drawing.Point(0, 0);\n            this.pdfDocumentView2.Name = \"pdfDocumentView2\";\n            this.pdfDocumentView2.Size = new System.Drawing.Size(626, 324);\n            this.pdfDocumentView2.TabIndex = 0;\n            this.pdfDocumentView2.Text = \"pdfDocumentView2\";\n            //\n            // Tab3\n            //\n            this.Tab3.Controls.Add(this.pdfDocumentView3);\n            this.Tab3.Image = null;\n            this.Tab3.ImageSize = new System.Drawing.Size(16, 16);\n            this.Tab3.Location = new System.Drawing.Point(3, 33);\n            this.Tab3.Name = \"Tab3\";\n            this.Tab3.Size = new System.Drawing.Size(626, 324);\n            this.Tab3.TabIndex = 3;\n            this.Tab3.Text = \"EmpReport.pdf\";\n            this.Tab3.ThemesEnabled = true;\n            //\n            // pdfDocumentView3\n            //\n            this.pdfDocumentView3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));\n            this.pdfDocumentView3.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.pdfDocumentView3.Location = new System.Drawing.Point(0, 0);\n            this.pdfDocumentView3.Name = \"pdfDocumentView3\";\n            this.pdfDocumentView3.Size = new System.Drawing.Size(626, 633);\n            this.pdfDocumentView3.TabIndex = 0;\n            this.pdfDocumentView3.Text = \"pdfDocumentView3\";\n            //\n            // toolStrip1\n            //\n            this.toolStrip1.ImageScalingSize = new System.Drawing.Size((int)DpiAware.LogicalToDeviceUnits(24), (int)DpiAware.LogicalToDeviceUnits(24));\n            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.toolStripButton1,\n            this.toolStripSeparator2,\n            this.btnPrint,\n            this.toolStripSeparator1,\n            this.btnGoToFirstPage,\n            this.btnGoToPreviousPage,\n            this.txtCurrentPageIndex,\n            this.toolStripLabel1,\n            this.lblTotalPageCount,\n            this.btnGoToNextPage,\n            this.btnGoToLastPage,\n            this.toolStripButton3,\n            this.btnZoomOut,\n            this.btnZoomIn,\n            this.cmbCurrentZoomLevel,\n            this.toolStripSeparator3,\n            this.FitPage,\n            this.toolStripSeparator5,\n            this.FitWidth});\n            this.toolStrip1.Location = new System.Drawing.Point(0, 0);\n            this.toolStrip1.Name = \"toolStrip1\";\n            this.toolStrip1.Size = new System.Drawing.Size(633, 25);\n            this.toolStrip1.TabIndex = 0;\n            this.toolStrip1.Text = \"toolStrip1\";\n            this.toolStrip1.ImageScalingSize = new Size((int)DpiAware.LogicalToDeviceUnits(24f), (int)DpiAware.LogicalToDeviceUnits(24f));\n            this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;\n            //\n            // toolStripButton1\n            //\n            this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.toolStripButton1.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"toolStripButton1.png\"));\n            this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.toolStripButton1.Name = \"toolStripButton1\";\n            this.toolStripButton1.Size = new System.Drawing.Size(23, 22);\n            this.toolStripButton1.Text = \"Click to open a PDF document.\";\n            this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);\n            //\n            // toolStripSeparator2\n            //\n            this.toolStripSeparator2.Name = \"toolStripSeparator2\";\n            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);\n            //\n            // btnPrint\n            //\n            this.btnPrint.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnPrint.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnPrint.png\"));\n            this.btnPrint.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnPrint.Name = \"btnPrint\";\n            this.btnPrint.Size = new System.Drawing.Size(23, 22);\n            this.btnPrint.Text = \"Click to Print this PDF file or pages from it.\";\n            this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);\n            //\n            // toolStripSeparator1\n            //\n            this.toolStripSeparator1.Name = \"toolStripSeparator1\";\n            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);\n            //\n            // btnGoToFirstPage\n            //\n            this.btnGoToFirstPage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnGoToFirstPage.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnGoToFirstPage.png\"));\n            this.btnGoToFirstPage.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnGoToFirstPage.Name = \"btnGoToFirstPage\";\n            this.btnGoToFirstPage.Size = new System.Drawing.Size(23, 22);\n            this.btnGoToFirstPage.Text = \"toolStripButton2\";\n            this.btnGoToFirstPage.ToolTipText = \"Click to go to first page in the document.\";\n            this.btnGoToFirstPage.Click += new System.EventHandler(this.btnGoToFirstPage_Click);\n            //\n            // btnGoToPreviousPage\n            //\n            this.btnGoToPreviousPage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnGoToPreviousPage.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnGoToPreviousPage.png\"));\n            this.btnGoToPreviousPage.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnGoToPreviousPage.Name = \"btnGoToPreviousPage\";\n            this.btnGoToPreviousPage.Size = new System.Drawing.Size(23, 22);\n            this.btnGoToPreviousPage.Text = \"toolStripButton3\";\n            this.btnGoToPreviousPage.ToolTipText = \"Click to go to previous page in the document.\";\n            this.btnGoToPreviousPage.Click += new System.EventHandler(this.btnGoToPreviousPage_Click);\n            //\n            // txtCurrentPageIndex\n            //\n            this.txtCurrentPageIndex.Name = \"txtCurrentPageIndex\";\n            this.txtCurrentPageIndex.Size = new System.Drawing.Size(30, 25);\n            this.txtCurrentPageIndex.Text = \"1\";\n            this.txtCurrentPageIndex.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;\n            this.txtCurrentPageIndex.KeyDown += new System.Windows.Forms.KeyEventHandler(txtCurrentPageIndex_KeyDown);\n            this.txtCurrentPageIndex.Click += new System.EventHandler(txtCurrentPageIndex_Click);\n            //\n            // toolStripLabel1\n            //\n            this.toolStripLabel1.Name = \"toolStripLabel1\";\n            this.toolStripLabel1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);\n            this.toolStripLabel1.Size = new System.Drawing.Size(17, 22);\n            this.toolStripLabel1.Text = \"/\";\n            //\n            // lblTotalPageCount\n            //\n            this.lblTotalPageCount.Name = \"lblTotalPageCount\";\n            this.lblTotalPageCount.Size = new System.Drawing.Size(25, 22);\n            this.lblTotalPageCount.Text = \"100\";\n            //\n            // btnGoToNextPage\n            //\n            this.btnGoToNextPage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnGoToNextPage.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnGoToNextPage.png\"));\n            this.btnGoToNextPage.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnGoToNextPage.Name = \"btnGoToNextPage\";\n            this.btnGoToNextPage.Size = new System.Drawing.Size(23, 22);\n            this.btnGoToNextPage.Text = \"toolStripButton4\";\n            this.btnGoToNextPage.ToolTipText = \"Click to go to next page in the document.\";\n            this.btnGoToNextPage.Click += new System.EventHandler(this.btnGoToNextPage_Click);\n            //\n            // btnGoToLastPage\n            //\n            this.btnGoToLastPage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnGoToLastPage.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnGoToLastPage.png\"));\n            this.btnGoToLastPage.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnGoToLastPage.Name = \"btnGoToLastPage\";\n            this.btnGoToLastPage.Size = new System.Drawing.Size(23, 22);\n            this.btnGoToLastPage.Text = \"toolStripButton5\";\n            this.btnGoToLastPage.ToolTipText = \"Click to go to last page in the document.\";\n            this.btnGoToLastPage.Click += new System.EventHandler(this.btnGoToLastPage_Click);\n            //\n            // toolStripButton3\n            //\n            this.toolStripButton3.Name = \"toolStripButton3\";\n            this.toolStripButton3.Size = new System.Drawing.Size(6, 25);\n            //\n            // btnZoomOut\n            //\n            this.btnZoomOut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnZoomOut.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnZoomOut.png\"));\n            this.btnZoomOut.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnZoomOut.Name = \"btnZoomOut\";\n            this.btnZoomOut.Size = new System.Drawing.Size(40, 40);\n            this.btnZoomOut.ToolTipText = \"Click to increase the magnification of the entire page.\";\n            this.btnZoomOut.Click += new System.EventHandler(this.ZoomOut_Click);\n            //\n            // btnZoomIn\n            //\n            this.btnZoomIn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.btnZoomIn.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"btnZoomIn.png\"));\n            this.btnZoomIn.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.btnZoomIn.Name = \"btnZoomIn\";\n            this.btnZoomIn.Size = new System.Drawing.Size(40, 40);\n            this.btnZoomIn.Text = \"toolStripButton4\";\n            this.btnZoomIn.ToolTipText = \"Click to decrease the magnification of the entire page.\";\n            this.btnZoomIn.Click += new System.EventHandler(this.ZoomIn_Click);\n            //\n            // cmbCurrentZoomLevel\n            //\n            this.cmbCurrentZoomLevel.Items.AddRange(new object[] {\n            \"50%\",\n            \"75%\",\n            \"100%\",\n            \"125%\",\n            \"150%\",\n            \"200%\",\n            \"400%\"});\n            this.cmbCurrentZoomLevel.Name = \"cmbCurrentZoomLevel\";\n            this.cmbCurrentZoomLevel.Size = new System.Drawing.Size(75, 25);\n            this.cmbCurrentZoomLevel.Text = \"100%\";\n            this.cmbCurrentZoomLevel.SelectedIndexChanged += new System.EventHandler(this.cmbCurrentZoomLevel_SelectedIndexChanged);\n            //\n            // toolStripSeparator3\n            //\n            this.toolStripSeparator3.Name = \"toolStripSeparator3\";\n            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25);\n            //\n            // FitPage\n            //\n            this.FitPage.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.FitPage.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"FitPage.png\"));\n            this.FitPage.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.FitPage.Name = \"FitPage\";\n            this.FitPage.Size = new System.Drawing.Size(23, 22);\n            this.FitPage.Text = \"Fit Page\";\n            this.FitPage.Click += new System.EventHandler(this.FitPage_Click);\n            //\n            // toolStripSeparator5\n            //\n            this.toolStripSeparator5.Name = \"toolStripSeparator5\";\n            this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);\n            //\n            // FitWidth\n            //\n            this.FitWidth.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n            this.FitWidth.Image = System.Drawing.Image.FromFile(MultiTabbedViewerDataSource.GetImagePath(\"FitWidth.png\"));\n            this.FitWidth.ImageTransparentColor = System.Drawing.Color.Magenta;\n            this.FitWidth.Name = \"FitWidth\";\n            this.FitWidth.Size = new System.Drawing.Size(23, 22);\n            this.FitWidth.Text = \"Fit Width\";\n            this.FitWidth.Click += new System.EventHandler(this.FitWidth_Click);\n            //\n            // Form1\n            //\n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.AutoSize = true;\n            this.ClientSize = new System.Drawing.Size(633, 386);\n            this.Controls.Add(this.tabControlAdv1);\n            this.Controls.Add(this.toolStrip1);\n            this.Icon = new System.Drawing.Icon(MultiTabbedViewerDataSource.GetIconPath(\"Icon.ico\"));\n            this.Name = \"Form1\";\n            this.Text = \"Multi Tabbed Viewer\";\n            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;\n            this.Load += new System.EventHandler(this.Form1_Load);\n            this.Tab1.ResumeLayout(false);\n            ((System.ComponentModel.ISupportInitialize)(this.tabControlAdv1)).EndInit();\n            this.tabControlAdv1.ResumeLayout(false);\n            this.Tab2.ResumeLayout(false);\n            this.Tab3.ResumeLayout(false);\n            this.toolStrip1.ResumeLayout(false);\n            this.toolStrip1.PerformLayout();\n            this.ResumeLayout(false);\n            this.PerformLayout();\n\n        }\n\n        #endregion\n        private System.Windows.Forms.ToolTip Tooltip;\n        private Syncfusion.Windows.Forms.Tools.TabControlAdv tabControlAdv1;\n        private Syncfusion.Windows.Forms.Tools.TabPageAdv Tab1;\n        private Syncfusion.Windows.Forms.Tools.TabPageAdv Tab2;\n        private Syncfusion.Windows.Forms.PdfViewer.PdfDocumentView pdfDocumentView1;\n        private Syncfusion.Windows.Forms.PdfViewer.PdfDocumentView pdfDocumentView2;\n        private System.Windows.Forms.ToolStrip toolStrip1;\n        private System.Windows.Forms.ToolStripButton btnPrint;\n        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\n        private System.Windows.Forms.ToolStripButton btnGoToFirstPage;\n        private System.Windows.Forms.ToolStripButton btnGoToPreviousPage;\n        private System.Windows.Forms.ToolStripTextBox txtCurrentPageIndex;\n        private System.Windows.Forms.ToolStripLabel toolStripLabel1;\n        private System.Windows.Forms.ToolStripLabel lblTotalPageCount;\n        private System.Windows.Forms.ToolStripButton btnGoToNextPage;\n        private System.Windows.Forms.ToolStripButton btnGoToLastPage;\n        private System.Windows.Forms.ToolStripComboBox cmbCurrentZoomLevel;\n        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;\n        private System.Windows.Forms.ToolStripSeparator toolStripButton3;\n        private System.Windows.Forms.ToolStripButton btnZoomIn;\n        private System.Windows.Forms.ToolStripButton btnZoomOut;\n        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;\n        private System.Windows.Forms.ToolStripButton toolStripButton1;\n        private Syncfusion.Windows.Forms.Tools.TabPageAdv Tab3;\n        private Syncfusion.Windows.Forms.PdfViewer.PdfDocumentView pdfDocumentView3;\n        private System.Windows.Forms.ToolStripButton FitPage;\n        private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;\n        private System.Windows.Forms.ToolStripButton FitWidth;\n    }\n}\n"
    },
    {
      "target": "src/components/pdfviewer-multi-tabbed-viewer/pdfviewer.cs",
      "content": "using System;\nusing System.Drawing;\nusing System.Windows.Forms;\nusing Syncfusion.Windows.Forms;\nusing Syncfusion.Windows.Forms.PdfViewer;\nusing Syncfusion.Windows.Forms.Tools;\n\nnamespace MultiTabbedViewer\n{\n    /// <summary>\n    /// Demonstrates a tabbed PDF viewer where every tab hosts an independent\n    /// <see cref=\"PdfDocumentView\"/> and a shared toolbar drives the active tab.\n    /// </summary>\n    public partial class Form1 : MetroForm\n    {\n        #region Private Members\n        private bool isDisposeCalled = false;\n        private Timer pageTimer;\n        private PdfDocumentView docViewer;\n        #endregion\n\n        #region Constructor\n\n        public Form1()\n        {\n            InitializeComponent();\n\n            // Position and size of the form.\n            Rectangle rect = System.Windows.Forms.Screen.PrimaryScreen.Bounds;\n            this.MinimumSize = new Size(rect.Width * 2 / 3, rect.Height * (3 / 2));\n            this.Location = new Point(rect.Width / 6, 0);\n            this.MetroColor = Color.Transparent;\n            this.WindowState = FormWindowState.Maximized;\n        }\n        #endregion\n\n        #region Events\n        private void Form1_Load(object sender, EventArgs e)\n        {\n            docViewer = new PdfDocumentView();\n            pageTimer = new Timer();\n            //Load all the pdf documents into the tab control\n            ActivateControl();\n            LoadDocument(pdfDocumentView3, MultiTabbedViewerDataSource.GetDocumentPath(2));\n            LoadDocument(pdfDocumentView2, MultiTabbedViewerDataSource.GetDocumentPath(1));\n            LoadDocument(pdfDocumentView1, MultiTabbedViewerDataSource.GetDocumentPath(0));\n\n        }\n        /// <summary>\n        /// On currentPageIndex Keydown\n        /// </summary>\n        void txtCurrentPageIndex_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)\n        {\n            if (e.KeyCode == Keys.Enter)\n            {\n                int index;\n                if (!string.IsNullOrEmpty(txtCurrentPageIndex.Text))\n                {\n                    int.TryParse(txtCurrentPageIndex.Text, out index);\n                    docViewer.GoToPageAtIndex(index);\n                }\n                txtCurrentPageIndex.Text = docViewer.CurrentPageIndex.ToString();\n            }\n        }\n\n        /// <summary>\n        /// On CurrentPageIndex Click\n        /// </summary>\n        void txtCurrentPageIndex_Click(object sender, System.EventArgs e)\n        {\n            txtCurrentPageIndex.SelectAll();\n        }\n\n        /// <summary>\n        /// On tab control changed.\n        /// </summary>\n        private void tabControlAdv1_Click(object sender, EventArgs e)\n        {\n            ActivateControl();\n            EnablePagination();\n        }\n\n        /// <summary>\n        /// Open a new document in the new tab.\n        /// </summary>\n        void toolStripButton1_Click(object sender, System.EventArgs e)\n        {\n            OpenFileDialog dialog = new OpenFileDialog();\n            dialog.Filter = \"Pdf Files (.pdf)|*.pdf\";\n            dialog.ShowDialog();\n            if (!string.IsNullOrEmpty(dialog.FileName))\n            {\n                //Adding a new tab and pdf document viewer control\n                string[] separator = { \"\\\\\", @\"\\\" };\n                string[] FileName = dialog.FileName.Split(separator, StringSplitOptions.RemoveEmptyEntries);\n                tabControlAdv1.TabPages.Add(new Syncfusion.Windows.Forms.Tools.TabPageAdv(FileName[FileName.Length - 1].ToString()));\n                PdfDocumentView pdfDocViewer = new PdfDocumentView();\n                pdfDocViewer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));\n                pdfDocViewer.Dock = System.Windows.Forms.DockStyle.Fill;\n                pdfDocViewer.Location = new System.Drawing.Point(0, 0);\n                pdfDocViewer.Name = \"pdfDocumentView\" + (tabControlAdv1.TabPages.Count);\n                pdfDocViewer.Size = new System.Drawing.Size(626, 633);\n                pdfDocViewer.Text = \"pdfDocumentView\" + (tabControlAdv1.TabPages.Count);\n                //Loads the document into the pdf document viewer\n                LoadDocument(pdfDocViewer, dialog.FileName);\n                tabControlAdv1.TabPages[tabControlAdv1.TabPages.Count - 1].Controls.Add(pdfDocViewer);\n                tabControlAdv1.SelectedIndex = tabControlAdv1.TabPages.Count - 1;\n                tabControlAdv1.SelectedTab.Text = FileName[FileName.Length - 1].ToString();\n                ActivateControl();\n                EnablePagination();\n            }\n        }\n\n        /// <summary>\n        /// Handles next page navigation.\n        /// </summary>\n        private void btnGoToNextPage_Click(object sender, EventArgs e)\n        {\n            if (docViewer.CanGoToNextPage)\n                docViewer.GoToNextPage();\n        }\n\n        /// <summary>\n        /// Handles previous page navigation.\n        /// </summary>\n        private void btnGoToPreviousPage_Click(object sender, EventArgs e)\n        {\n            if (docViewer.CanGoToPreviousPage)\n                docViewer.GoToPreviousPage();\n        }\n\n        /// <summary>\n        /// Handles last page navigation.\n        /// </summary>\n        private void btnGoToLastPage_Click(object sender, EventArgs e)\n        {\n            if (docViewer.CanGoToLastPage)\n                docViewer.GoToLastPage();\n        }\n\n        /// <summary>\n        /// Handles first page navigation.\n        /// </summary>\n        private void btnGoToFirstPage_Click(object sender, EventArgs e)\n        {\n            if (docViewer.CanGoToFirstPage)\n                docViewer.GoToFirstPage();\n        }\n\n        /// <summary>\n        /// Handles zoom.\n        /// </summary>\n        private void cmbCurrentZoomLevel_SelectedIndexChanged(object sender, EventArgs e)\n        {\n            int ZoomLevel = MultiTabbedViewerDataSource.GetZoomPercentage(cmbCurrentZoomLevel.SelectedItem.ToString());\n            docViewer.ZoomTo(ZoomLevel);\n        }\n\n        /// <summary>\n        /// Handles zoom in.\n        /// </summary>\n        private void ZoomOut_Click(object sender, EventArgs e)\n        {\n            if (cmbCurrentZoomLevel.SelectedIndex != 0)\n                cmbCurrentZoomLevel.SelectedIndex = cmbCurrentZoomLevel.SelectedIndex - 1;\n        }\n\n        /// <summary>\n        /// Handles zoom out.\n        /// </summary>\n        private void ZoomIn_Click(object sender, EventArgs e)\n        {\n            if (cmbCurrentZoomLevel.SelectedIndex != cmbCurrentZoomLevel.Items.Count - 1)\n                cmbCurrentZoomLevel.SelectedIndex = cmbCurrentZoomLevel.SelectedIndex + 1;\n        }\n\n        /// <summary>\n        /// Prints the document.\n        /// </summary>\n        private void btnPrint_Click(object sender, EventArgs e)\n        {\n            PrintDialog dialog = new PrintDialog();\n\n            int pageCount = docViewer.PageCount;\n            dialog.AllowPrintToFile = true;\n            dialog.AllowSomePages = true;\n            dialog.PrinterSettings.FromPage = 1;\n            dialog.PrinterSettings.ToPage = pageCount;\n            dialog.PrinterSettings.MaximumPage = pageCount;\n            dialog.PrinterSettings.MinimumPage = 1;\n\n            if (dialog.ShowDialog() == DialogResult.OK)\n            {\n                docViewer.PrintDocument.PrinterSettings.PrinterName = dialog.PrinterSettings.PrinterName;\n                dialog.Document = docViewer.PrintDocument;\n                dialog.Document.Print();\n            }\n        }\n\n        /// <summary>\n        /// On tab closed, reorder the document viewer control\n        /// </summary>\n        private void tabControlAdv1_ControlRemoved(object sender, ControlEventArgs e)\n        {\n            if (!isDisposeCalled)\n            {\n                if (tabControlAdv1.SelectedIndex > -1)\n                {\n                    for (int i = tabControlAdv1.SelectedIndex; i < tabControlAdv1.TabPages.Count; i++)\n                    {\n                        Control[] pdfControl = tabControlAdv1.TabPages[i].Controls.Find(\"pdfDocumentView\" + (i + 2), true);\n                        if (pdfControl.Length > 0 && pdfControl[0] is PdfDocumentView)\n                        {\n                            PdfDocumentView viewer = pdfControl[0] as PdfDocumentView;\n                            viewer.Name = \"pdfDocumentView\" + (i + 1);\n                        }\n                    }\n                    ActivateControl();\n                    EnablePagination();\n                }\n                else\n                {\n                    Reset();\n                }\n            }\n            isDisposeCalled = false;\n        }\n\n        /// <summary>\n        /// Handles the fit page\n        /// </summary>\n        private void FitPage_Click(object sender, EventArgs e)\n        {\n            docViewer.ZoomTo(ZoomMode.FitPage);\n            cmbCurrentZoomLevel.Text = docViewer.ZoomPercentage.ToString() + \"%\";\n        }\n\n        /// <summary>\n        /// Handles the fit width\n        /// </summary>\n        private void FitWidth_Click(object sender, EventArgs e)\n        {\n            docViewer.ZoomTo(ZoomMode.FitWidth);\n            cmbCurrentZoomLevel.Text = docViewer.ZoomPercentage.ToString() + \"%\";\n        }\n        #endregion\n\n        #region Helper methods\n\n        /// <summary>\n        /// Load a PDF document.\n        /// </summary>\n        private void LoadDocument(PdfDocumentView viewer, string fileName)\n        {\n            if (!System.IO.File.Exists(fileName))\n                return;\n\n            viewer.Load(fileName);\n            lblTotalPageCount.Text = viewer.PageCount.ToString();\n            EnablePagination();\n            pageTimer.Tick += pageTimer_Tick;\n            pageTimer.Start();\n        }\n\n        void pageTimer_Tick(object sender, EventArgs e)\n        {\n            if (docViewer.PageCount > 1)\n            {\n                this.btnGoToNextPage.Enabled = true;\n                this.btnGoToLastPage.Enabled = true;\n                pageTimer.Stop();\n            }\n        }\n\n        /// <summary>\n        /// Assigning page index.\n        /// </summary>\n        void docViewer_CurrentPageChanged(object sender, EventArgs args)\n        {\n            int pageIndex = (sender as PdfDocumentView).CurrentPageIndex;\n            this.txtCurrentPageIndex.Text = pageIndex.ToString();\n            EnablePagination();\n        }\n\n        /// <summary>\n        /// Enable or disable paginate buttons.\n        /// </summary>\n        private void EnablePagination()\n        {\n            this.btnGoToNextPage.Enabled = docViewer.CanGoToNextPage;\n            this.btnGoToLastPage.Enabled = docViewer.CanGoToLastPage;\n            this.btnGoToPreviousPage.Enabled = docViewer.CanGoToPreviousPage;\n            this.btnGoToFirstPage.Enabled = docViewer.CanGoToFirstPage;\n        }\n\n        /// <summary>\n        /// Activates the current tab control\n        /// </summary>\n        private void ActivateControl()\n        {\n            //Find a pdf document viewer in the selected tab page.\n            Control[] pdfControl = tabControlAdv1.SelectedTab.Controls.Find(\"pdfDocumentView\" + (tabControlAdv1.SelectedIndex + 1), true);\n            if (pdfControl.Length > 0 && pdfControl[0] is PdfDocumentView)\n                docViewer = pdfControl[0] as PdfDocumentView;\n            //Adding event handler for current page index\n            docViewer.CurrentPageChanged += new PdfDocumentView.CurrentPageChangedEventHandler(docViewer_CurrentPageChanged);\n            this.txtCurrentPageIndex.Text = docViewer.CurrentPageIndex.ToString();\n            this.lblTotalPageCount.Text = docViewer.PageCount.ToString();\n            this.cmbCurrentZoomLevel.Text = docViewer.ZoomPercentage.ToString() + \"%\";\n            docViewer.Focus();\n        }\n\n        /// <summary>\n        /// Reset all the fields\n        /// </summary>\n        private void Reset()\n        {\n            btnGoToFirstPage.Enabled = false;\n            btnGoToLastPage.Enabled = false;\n            btnGoToNextPage.Enabled = false;\n            btnGoToPreviousPage.Enabled = false;\n            txtCurrentPageIndex.Text = \"0\";\n            lblTotalPageCount.Text = \"0\";\n        }\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n        protected override void Dispose(bool disposing)\n        {\n            isDisposeCalled = true;\n            if (pageTimer != null && pageTimer.Enabled)\n                pageTimer.Stop();\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n        #endregion\n    }\n}\n"
    }
  ]
}