在asp.net中使用页面范围进行静音打印

时间:2013-12-13 03:30:57

标签: asp.net vb.net printing process acrobat

我可以静音打印然后输入页面范围(通过代码隐藏)而不是打印整个文档,如下面的代码?

    Dim infoPrint As New ProcessStartInfo()
        infoPrint.Arguments = "\" & rcbPrinters.SelectedItem.Text & "\"
        infoPrint.FileName = Session("strPath") 
        infoPrint.CreateNoWindow = True
        infoPrint.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
        infoPrint.UseShellExecute = True
        infoPrint.Verb = "Print"
        System.Diagnostics.Process.Start(infoPrint)
        System.Threading.Thread.Sleep(50000)
        Dim Process1 As New Process
        For Each prc As Process In Process.GetProcessesByName("AcroRd32")
            prc.Kill()
        Next

提前致谢

1 个答案:

答案 0 :(得分:0)

我刚刚通过提取页面然后将其保存为新文件然后打印该文件来使用此功能 http://forums.asp.net/t/1630140.aspx