Esempio n. 1
0
        static void Main(string[] args)
        {
            string FileName = "YourFileName.docx";
            Document doc = new Document(FileName);

            ActivePrintPreviewDialog previewDlg = new ActivePrintPreviewDialog();

            // Pass the Aspose.Words print document to the Print Preview dialog.
            previewDlg.Document = doc;
            // Specify additional parameters of the Print Preview dialog.
            previewDlg.ShowInTaskbar = true;
            previewDlg.MinimizeBox = true;
            previewDlg.PrintPreviewControl.Zoom = 1;
            previewDlg.Document.DocumentName = "TestName.doc";
            previewDlg.WindowState = FormWindowState.Maximized;
            // Show the appropriately configured Print Preview dialog.
            previewDlg.ShowDialog();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string   FileName = "YourFileName.docx";
            Document doc      = new Document(FileName);

            ActivePrintPreviewDialog previewDlg = new ActivePrintPreviewDialog();

            // Pass the Aspose.Words print document to the Print Preview dialog.
            previewDlg.Document = doc;
            // Specify additional parameters of the Print Preview dialog.
            previewDlg.ShowInTaskbar            = true;
            previewDlg.MinimizeBox              = true;
            previewDlg.PrintPreviewControl.Zoom = 1;
            previewDlg.Document.DocumentName    = "TestName.doc";
            previewDlg.WindowState              = FormWindowState.Maximized;
            // Show the appropriately configured Print Preview dialog.
            previewDlg.ShowDialog();
        }
        static void Main(string[] args)
        {
            Document        doc     = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Writeln("Hello world!");

            ActivePrintPreviewDialog previewDlg = new ActivePrintPreviewDialog();

            // Pass the Aspose.Words print document to the Print Preview dialog.
            previewDlg.Document = new AsposeWordsPrintDocument(doc);

            // Specify additional parameters of the Print Preview dialog.
            previewDlg.ShowInTaskbar            = true;
            previewDlg.MinimizeBox              = true;
            previewDlg.PrintPreviewControl.Zoom = 1;
            previewDlg.Document.DocumentName    = "TestName.doc";
            previewDlg.WindowState              = FormWindowState.Maximized;

            // Show the appropriately configured Print Preview dialog.
            previewDlg.ShowDialog();
        }