Call PDFPrint Command Line v2.0 from C#

I am new at programming in VB and I am trying to use the ShellExecute API to run your utility. It works great except for the problem I had with the number of copies not working but I got around that. I have your utility installed on my PC for my testing so this afternoon I put it on the server we would be running it from and now it doesn't work. I can run the command from a DOS Command window but when I try and run it from my VB code it doesn't work. Could anyone there help me with the VB code?
=============================
What user account did you run pdfprint.exe inside? Did you run it from system user account?

Please notice an important matter, system user account hasn't network accessable privilege, if you run pdfprint.exe from system user account, your VB application and pdfprint.exe all can't access to network printer.

We suggest you may run pdfprint.exe from an interactive user account instead of system user account, you can use CmdAsUser.exe or Free docPrint Service to run pdfprint.exe application from an interactive user account,

http://verydoc.com/exeshell.html

if you are use Free docPrint Service, please refer to following solution,

docPrint_Service.zip (83.6 KB):
http://verydoc.com/download/docPrint_Service.zip
docPrint Service can be used to run a Command Line from current active user account or a special user account, this tool is useful to overcome permission restrictions in SYSTEM and Non-Interactive user accounts.
Please by following steps to use docPrint Service,
1. Download docPrint_Service.zip and unzip it to a folder,
2. Run docPrint_Service.exe application, you will see an icon appear in tray area,
3. You can run following command lines to test it first, "docPrint_client.exe" will deliver the Command Line to docPrint_Service.exe application, docPrint_Service.exe application will execute the Command Line from active user account automatically,

docPrint_client.exe nowait "C:\VeryDOC\pdfprint.exe" -printer "\\wat-ut03\lpcduple" -duplex 3 -copies 3 -setcopyto C:\test.pdf
docPrint_client.exe wait "C:\VeryDOC\pdfprint.exe" -printer "\\wat-ut03\lpcduple" -duplex 3 -copies 3 -setcopyto C:\test.pdf
4. You can call "docPrint_client.exe" from your code, please refer to a simple C# code at below,
public partial class runpptexe : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Process proc = new Process();
proc.StartInfo.FileName = "C:\\VeryDOC\\docPrint_client.exe";
string strArguments = "wait C:\\VeryDOC\\pptconv.exe C:\\test.ppt C:\\test.swf";
Console.WriteLine(strArguments);
proc.StartInfo.Arguments = @strArguments;
proc.Start();
proc.WaitForExit();
Response.Write("File has been successfully converted");
}
}

You can port above C# code to VB code easily, if you don't know how to do, please feel free to let me know, I will change it to VB code and send the VB code to you shortly.

VeryPDF
========================================

I have been trying unsuccessfully all day to get the CmdAsuser command to work. I have also been playing around with the other freeware commands RunAs and LsRunAS without success. I am in the process of setting some of this up on the server where it will run from so I won't be able to try out my security changes until the morning. I am trying to run PDFPrint.exe from an SSIS package that is coded in VB. The package runs on a server and is called from a Server agent job that is kicked off by a SSRS report. The job uses a Proxy sign on so that we only have to add our report users to one group and they have all the security they need for running the reports. I guess when I try and run the ShellExecute to call your PDFPrint it must not use the Proxy sign on. Once I get the command to run form a DOS command window I will try putting it in my VB code. If I use the CmdAsUser command or the RunAs command (I have had more success with the RunAs command) do I still need to run ShellExecute in my VB code? Could you give me an example of how I would set up the VB code to run this?
===============================
You can use docPrint_client.exe application to call pdfprint.exe application from an interactive user account, I'm sure this solution will work fine to you.

If you still can't get it work, please create a remote desktop account on your test machine, after we logged into your test machine, we will research this problem for you asap.

Also, if you can use the CmdAsUser command or the RunAs command successful, you still need to call CmdAsUser or RunAs Command Line from your VB code by ShellExecute() or CreateProcess() function.

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in PDF Print and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!