コード例 #1
0
ファイル: Program.cs プロジェクト: joyang1/Aspose_Words_NET
        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();
        }
コード例 #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();
        }
コード例 #3
0
        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();
        }