Quantcast
Channel: Comments on: PDF: direct printing with .NET
Viewing all articles
Browse latest Browse all 20

By: Aj

$
0
0

Amazing article ….
5. Printing a pdf with Acrobat Reader command line
Dim strDelemiter =”@”
Dim PrintPDF As New ProcessStartInfo

Dim adobeOtherWay = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(“Software”).OpenSubKey(“Classes”).OpenSubKey(“acrobat”).OpenSubKey(“shell”).OpenSubKey(“open”).OpenSubKey(“command”)
Dim pathOtherWay As String
pathOtherWay = adobeOtherWay.GetValue(“”).ToString()
PrintPDF.FileName = strDelemiter & pathOtherWay
PrintPDF.Arguments = String.Format(“/s /o /h /p{0}”, BatchFile)
PrintPDF.WindowStyle = ProcessWindowStyle.Hidden
PrintPDF.CreateNoWindow = True
PrintPDF.UseShellExecute = True
Process.Start(PrintPDF)


Viewing all articles
Browse latest Browse all 20