zoukankan      html  css  js  c++  java
  • C# word打印文档打印不全(数据为完全发送至打印机,程序已经退出)

    我们在调用word打印的时候有时候出现过这种情况。即,我们调用wordDoc.PrintOut把数据发送给打印机后,调用关闭程序的方法,有时候会出现数据未完全发送给打印机造成数据丢失页面打印不全的问题。

    解决办法:强制让程序把数据全部发给打印机后在关掉结束掉打印进程。

    object wdpa = WdPrintOutRange.wdPrintAllDocument;
                    object wdItem = WdPrintOutItem.wdPrintDocumentContent;
                    object wdPageType = WdPrintOutPages.wdPrintAllPages;
                    object background = false;

                    wordApp.PrintOut(ref background, ref Nothing, ref wdpa, ref Nothing,
                        ref Nothing, ref Nothing, ref wdItem, ref Nothing,
                        ref Nothing, ref wdPageType, ref Nothing, ref Nothing,
                        ref Nothing, ref Nothing, ref Nothing,
                        ref Nothing, ref Nothing, ref Nothing, ref Nothing);

    其上可以解决

  • 相关阅读:
    Swift编码总结4
    Swift编码总结3
    无题
    WebSocket桌面客户端工具
    Dell U2913WM使用感受
    Oracle DB 12c first glance
    [翻译] Oracle Database 12c 新特性Multitenant
    一眨眼oracle 12c也有了
    .Net内存泄露原因及解决办法
    .NET 强引用和弱引用
  • 原文地址:https://www.cnblogs.com/chenbg2001/p/2036599.html
Copyright © 2011-2022 走看看