This Forum is Currently Locked – Access is Read Only
You must be logged in to post Login


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

PDFPrint Not Working – "The application failed to intialize properly (0x0000142)"

UserPost

3:14 pm
September 9, 2011


pdfprintUser

New Member

posts 1

Hi all,

Hope someone can help me out on this one.  I read in another VeryPDF post that this error has been known to happen on Windows 2008 Server x64 and not so much on Windows 2003 server.  I am running this on a Windows 2003 server SP 2 and I have confirmed that the directory 'C:\Windows\System32\config\systemprofile\Desktop' exists.  So, what else could cause this problem?

 

Here is the exact code that I am running (it is in C#) to invoke the pdfprint executable:

            var psi = new ProcessStartInfo(printExe, args)
            {
                ErrorDialog = false,
                WindowStyle = ProcessWindowStyle.Hidden,
                UseShellExecute = false,
                RedirectStandardError = true,
                RedirectStandardOutput = true,
                Domain = ConfigurationManager.AppSettings["DomainName"],
                UserName = ConfigurationManager.AppSettings["UserName"],
                Password = secPass,
            };

 

            var pdfPrint = Process.Start(psi);
            if (pdfPrint == null)
            {
                throw new ArgumentException("Failed to start Process.");
            }

 

This code looks like it should invoke the pdfprint executable without issue.  I am at a loss.

I am logging out the exit code and it states that it exits with the code: 128

 

Any help on this issue is greatly appreciated.

 

Thanks!

1:12 am
September 10, 2011


VeryPDF

Admin

posts 136

Your problem seems caused by permission restriction in default Local System User Account, we suggestion you may use CmdAsUser.exe to run pdfprint.exe from an interactive user account, this problem will be solved properly.

1:22 am
September 10, 2011


VeryPDF

Admin

posts 136

Post edited 9:42 pm – May 3, 2018 by VeryPDF


Please by following steps to try again,

 

1. please make sure pdfprint.exe can be run from CMD window by manual first,

 

pdfprint.exe C:verypdftest.pdf

 

if you can run pdfprint.exe from CMD window to print your PDF file properly, it is indicate everything is fine in the current user account, we assume the current user account is "Administrator",

 

2. Please download CmdAsUser.exe from following web page,

http://www.verydoc.com/exeshell.html

http://www.verydoc.com/download/cmdasuser.zip

 

Unzip it to a folder, e.g., to C:verypdf folder, and run following command line to test it again,

 

CmdAsUser.exe Administrator . /p password /c "C:verypdfpdfprint.exe" -printer "192.168.1.10VeryPDFPrinter" C:verypdftest.pdf

 

In most systems, you may encounter #1314 error, it is indicate you haven't enough permission to switch the user account, please look at the following web page to solve the #1314 permission problem,

 

http://www.verydoc.com/exeshell.html

 

after you solved #1314 permission problem, you should no problem to launch pdfprint.exe via CmdAsUser.exe application, let's continue to the next step,

 

3.You can call CmdAsUser.exe from your C# code to instead of pdfprint.exe application, for example,

printExe = "C:verypdfcmdasuser.exe";
args = "Administrator . /p password /c "C:verypdfpdfprint.exe" -printer "192.168.1.10VeryPDFPrinter" C:verypdftest.pdf";

var psi = new ProcessStartInfo(printExe, args)
            {
                ErrorDialog = false,
                WindowStyle = ProcessWindowStyle.Hidden,
                UseShellExecute = false,
                RedirectStandardError = true,
                RedirectStandardOutput = true,
                Domain = ConfigurationManager.AppSettings["DomainName"],
                UserName = ConfigurationManager.AppSettings["UserName"],
                Password = secPass,
            };

 

            var pdfPrint = Process.Start(psi);
            if (pdfPrint == null)
            {
                throw new ArgumentException("Failed to start Process.");
            }

 

4. In general, you should no problem to print the PDF file from your C# source code now.

If you still can't get it work, please feel free contact us via email support@verypdf.com, we will try to login your system to research this problem for you asap.

 

VeryPDF

1:26 am
September 10, 2011


VeryPDF

Admin

posts 136

Post edited 9:41 pm – May 3, 2018 by VeryPDF


You can also call pdfprint.exe via free docPrint Service, please look at following web page to study more information about how to use docPrint Service application,

 

Call PDFPrint Command Line v2.0 from C#


About the VeryPDF Knowledge Base Forum

Forum Timezone: Europe/Lisbon

Most Users Ever Online: 104

Currently Online:
1 Guest

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 1
Forums: 1
Topics: 72
Posts: 170

Membership:

There are 192111 Members

There is 1 Admin

Top Posters:

VeryPDF – 21
PeterS – 4
Arjen – 3
Martijn_K – 2
pdfprintUser – 1
eurban – 1

Recent New Members: Manuel Ruiz, djebbi walid, Andrey Rostov, Novice, Eric de los Santos, arisetio purnomo

Administrators: VeryPDF (136 Posts)



 
VN:F [1.9.20_1166]
Rating: 6.1/10 (34 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 20 votes)
Forum, 6.1 out of 10 based on 34 ratings