Slow conversion speed when call doc2pdf.exe by ShellExecute() function

I tryed to install docPrint Pro v5.0 on one of my VMs, where I have full administrator privileged, and it installed correctly.

But I have one weird symptom :

1- I have a program that launch doc2pdf.exe via a batch file, to convert a .RTF file to a .PDF, with a timeout of 60 sec.

2- Each time I start this convertion, it take AT LEAST 55 seconds before the file get into the print queue... Does I miss something? Is there any way to improve the convertion speed? (It's a little .RTF file (4k), Office 2007 installed).

3- When installing docPrint Pro 5.0 on my computer, the setup.log was empty. I'll try again in a few minutes with administrator privileges (as soon as my admin is back)

1), 2). Thanks for your message, doc2pdf.exe will launch MS Word and print this Word DOC file to docPrint PDF Driver, the time maybe spend on Word launching.

just for test purpose, you can download doc to any converter from following web page to try,

if your system has MS Word 2007 or 2010 installed (plus Microsoft Office 2007 PDF&XPS Add-in), doc to any converter does convert Word DOC file to PDF file quickly, it is faster than doc2pdf.exe application.

3). Please set "outlog=Yes" into "C:\Program Files\docPrint Pro v5.0\psdriver\config.ini" file, and run setup.exe again, you will get a proper setup.log file,


For my installation of docPrint Pro, I just set the output to Yes.

This is the log output after modifying config.ini and run setup.exe again:

GetFileAttributes("C:\WINDOWS\SysWOW64") return 16, setup.c:224
dwAttrib|FILE_ATTRIBUTE_DIRECTORY is TRUE, setup.c:227
On the x64 system, please run setupx64.exe to instead of setup.exe to try again.

... Weird, I'm not on a 64bits system. I'm on a XP SP3 32bit. I checked the SysWow64 directory, and it was there, but empty. I deleted it successfully, and now setup.exe installed the docPrint PDF Driver correctly.

Now for the long wait delay, can you show me how to activate logs that could help me find why it wait so much before adding the file into queue?

I'll make some tests, and come back in a few minutes. I'll try the DocToAny if possible too.

The "Delay" may caused by MS Word startup, after you launch a conversion by doc2pdf.exe application, please double check doc2pdf.exe in task manager, how long time before the printer icon appear in the tray area? The time of from "MS Word launch" and "printer icon appear" is the real time of MS Word taking.

Another problem : How I can enter my serial ?
When starting doc2pdf.exe, it tells me that "This is the trial version of docPrint PDF Driver:" (Which is not...)

I tryed Document Converter (docPrint Pro) v5.0 -> Help(H) -> Register Document Converter.

Now the register problem is gone, tx for your help 🙂

I have 2 weird cases, which I'll try to explain to you :
1- First, I have 1 window in my application that launch directly doc2pdf with this command line :

C:\Program Files\docPrint Pro v5.0\doc2pdf.exe -f "8.5x11in" -i "example.rtf" -o "outputfile.pdf" -p 2

This call convert one example.rtf and append it to outputfile.pdf. It being done in ~20sec.

2- Second case, I have a .DLL file that launch doc2pdf using a batch file.

c:\Program Files\docPrint Pro v5.0\doc2pdf.exe" -i %1 -o %2 -b 1 -r 150x150 -d -f 1

This one take forever.
Between the "Please wait..." and the start of the countdown, I can wait easily 55 seconds, and no process get over 1% of CPU time... when it finally get in the print queue, it take 8 sec and it's converted... (55+8 > 60 sec, my timeout...)

Do you have any hint that I can use to change this very long delay?

Additionnal notes for previous post.
Note: Case1 have no problem, the weird one is Case 2.
Note2: It's on the same installation, machine.
Note3: Windows Office 2003
for the case 2, is doc2pdf.exe run inside system user account? if yes, you need arrange MS Word process run inside an interactive user account instead of non-interactive user account, please refer to the information at following web page,

While running from command line :
C:\>"C:\Program Files\docPrint Pro v5.0\doc2pdf.exe" -i "C:\TEST.RTF" -o "C:\TEST.PDF" -f 1
Waiting here (0)...
Waiting here (1)...
Waiting here (2)...
Waiting here (3)...
Waiting here (4)...
Waiting here (5)...
Waiting here (6)...
Waiting here (7)...
Waiting here (8)...
Page 1: C:\TEST.PDF
C:\TEST.RTF ==> C:\TEST.PDF, Result Code = 1
Conversion time = 11.45s (11453ms)

While running from .bat file, launched by a .Dll loaded by our application :
Please wait ...
Waiting here (0)...
Waiting here (1)...
Waiting here (2)...
Waiting here (3)...
Waiting here (4)...
Waiting here (5)...
Waiting here (6)...
Page 1: C:\2011040004_110822_112902.PDF
C:\2011040004_110822_112902.rtf ==> C:\2011040004_110822_112902.PDF, Result Code = 1
Conversion time = 62.09s (62094ms)
Press any key to continue . . .

From doc2pdf.log
ConvertDocumenttoOtherFormats("C:\2011040004_110822_112902.rtf" => "C:\2011040004_110822_112902.PDF")
Active Printer Name is: 'docPrint PDF Driver'
Finished conversion, waiting at here...

... I checked the COM+ rights, and nothing seems wrong with the Microsoft Word Document application, in both COM+ and DCOM config.


PrinterProcessorDatatype=NT EMF 1.003


Can you point me out what COM+ Application and/or DCOM configuration I should check out to convert an .RTF file to a .PDF (I have Microsoft Office Word 2003 (11.8328.8329) SP3 installed)

Or any other tips to get additionnal informations that may be required by you ?

Tx for the support.
Here is what the .bat does

@Echo off
Echo Please wait ...
"c:\Program Files\docPrint Pro v5.0\doc2pdf.exe" -i %1 -o %2 -D -f 1
Additionnal Notes : Modifying the .Dll to bypass the .bat file (directly launch docPrint.exe) does not give better results...
Here, I'm able to reproduce it using command line.
Enter command prompt (cmd)

Type something like this :
C:\Windows\System32\cmd.exe /C D:\TelDigSystems\Debug\Doc2pdf.bat "C:\2011040004_110822_170514.rtf" "C:\TEST.PDF"

Any Ideas?
It's an emergency here, customer is waiting for input...
When you call your DLL to convert a RTF file to PDF file, what is the owner of winword.exe in task manager? if the owner is SYSTEM or Local System, it is indicate winword.exe is run inside the non-interactive user account, you should arrange Word COM+ run inside an interactive user account, please look at following web page for more information,

also, in "Console Root / Component Services / Computers / My computer / DCOM Config" option, "Your COM Name" should equal to “Microsoft Office Word 97 – 2003 Document” in your system, please give enough permission to “Microsoft Office Word 97 – 2003 Document” DCOM in your system to try again, you can also run “Microsoft Office Word 97 – 2003 Document” DCOM from an interactive user account to solve the permission restrictions in default system account.

Somehow I corrected the long delay: I now use CreateProcess on "cmd.exe /C" to start the batch file instead of a ShellExecute. I got from 65 seconds to 11 seconds, which is what I was aiming for.

But the reproduce steps still works.
Please create a FAQ or something on this new entry.

Have a nice day.
Thanks for your message, yes, CreateProcess() function is work better than ShellExecute() function, I will create a FAQ for this problem at later, thank you for your kindly information.

Have a nice day!


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

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!