Click here to Skip to main content
15,312,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a command line to operate a print job in VB.
For code I use

Dim appPath As String = "C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe"
      Dim filepath As String = "pathToFile"
      Dim printerName As String = "\\PrintServer\name of the printer"
      Dim psi As New ProcessStartInfo(appPath, "/N " + "/T" + filepath + printerName)

Usually this works great.
But sometimes it happens that a print job isn't printed.
I monitor every step of the process until my file gets printed.
My monitoring shows that everything is fine till I Run this process.
every file is send to the printer.
I don't get any errors if the file isn't printed.
Is there a way to check what is going wrong?

P.s. I can't use third party applications.

Thx in advance.
Pradeep Shukla 23-Sep-13 16:19pm
I used a similar code in my project but did not face any such issue. Only thing that is different here is that I use only Adobe Reader 9.5. As Adobe has enabled document security from ver.10 onwards it prevents loading the document via this mechanism unless you modify the settings.
Tom Wauters 23-Sep-13 23:54pm
Thx for the reply.
V10.0 is what I use at home.
The application I have the problem with uses V9.0
When I debug it local I use V11.0.
I have noticed that + V10.0 is case sensitive
about what Filepath and printername concerns, but
with V11.0 It seems to work in the same mather.
I think it is a printerproblem, maybe a time out or something like
that. That's why I wanted to know how to catch those error's
I appriciate your reply anyway.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900