Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Although this is VB you can easily translate it. By the way Adobe does not pop up, it only prints the pdf and then goes away.</p> <pre><code>''' &lt;summary&gt; ''' Start Adobe Process to print document ''' &lt;/summary&gt; ''' &lt;param name="p"&gt;&lt;/param&gt; ''' &lt;remarks&gt;&lt;/remarks&gt; Private Function printDoc(ByVal p As PrintObj) As PrintObj Dim myProcess As New Process() Dim myProcessStartInfo As New ProcessStartInfo(adobePath) Dim errMsg As String = String.Empty Dim outFile As String = String.Empty myProcessStartInfo.UseShellExecute = False myProcessStartInfo.RedirectStandardOutput = True myProcessStartInfo.RedirectStandardError = True Try If canIprintFile(p.sourceFolder &amp; p.sourceFileName) Then isAdobeRunning(p)'Make sure Adobe is not running; wait till it's done Try myProcessStartInfo.Arguments = " /t " &amp; """" &amp; p.sourceFolder &amp; p.sourceFileName &amp; """" &amp; " " &amp; """" &amp; p.destination &amp; """" myProcess.StartInfo = myProcessStartInfo myProcess.Start() myProcess.CloseMainWindow() isAdobeRunning(p) myProcess.Dispose() Catch ex As Exception End Try p.result = "OK" Else p.result = "The file that the Document Printer is tryng to print is missing." sendMailNotification("The file that the Document Printer is tryng to print" &amp; vbCrLf &amp; _ "is missing. The file in question is: " &amp; vbCrLf &amp; _ p.sourceFolder &amp; p.sourceFileName, p) End If Catch ex As Exception p.result = ex.Message sendMailNotification(ex.Message, p) Finally myProcess.Dispose() End Try Return p End Function </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload