I am evaluating your product and I require some help.
Our proposed portal is being developed in Php running on Tomcat.
A user loads a word / excel / ppt document. Let us say the user loads test.doc. The document is renamed to user1011.doc based on a logic and is uploaded in a directory called upload.
The first page of test.doc needs to be converted to a gif file user1011.gif. This should be saved in the upload folder.
This is what I have done so far:
Moved the following three files to the root directory of localhost: cimage.dll, doc2any.exe and pdftoolsdk.dll.
In the php program I placed the following codes relevant to doc2any.
$infile=$directory . $filname;
$outfile= "uploads/" . $docname . ".gif";
echo $infile; returns uploads/v.doc
echo $outfile; returns uploads/v.gif
$timage=$dir .'\doc2any.exe -nooffice -pagerange 1 ' .$infile . $outfile;
$result = exec($timage) ;
if(! $result )
die('Problem with doc2any :: ' . mysql_error());
When executed I get an error message:
Problem with doc2any ::
Please let me know where I am going wrong.
Can I also convert the first page of a pdf upload?
What sort of licensing needs to be purchased? We plan to host this portal on Godaddy server sometime in July.
Appreciate your comeback.
This problem is caused by permission restrictions in SYSTEM user account, you can use VeryPDFComRunCmd COM to call doc2any.exe from PHP code to try again.
VeryPDFComRunCmd is an EXE COM Component which can be used to launch any EXE or Office application from ASP, PHP, C#, .NET etc. program languages. VeryPDFComRunCmd COM is a freeware.
You can use following ASP code to call any EXE or MS Office without any permission problem,
set VeryPDFCom = Server.CreateObject("VeryPDFCom.RunCmd")
dim nRetVal, bRet
bRet = VeryPDFCom.RunCmd("D:\verydoc\doc2any.exe D:\test.doc D:\out.pdf", 5, 0)
strRet = VeryPDFCom.RunCmd2("D:\verydoc\doc2any.exe D:\test.doc D:\out.pdf", 5)
Response.Write strRet & vbCrlf
This is a PHP source code example to call doc2any.exe by VeryPDFComRunCmd COM interface,
$VeryPDFCom = new COM("VeryPDFCom.RunCmd") or Die ("Did not connect");
$strRet = VeryPDFCom->RunCmd2("D:\verydoc\doc2any.exe D:\test.doc D:\out.pdf", 5);
You can use VeryPDFComRunCmd COM to overcome limitations in SYSTEM user account easily, please give it a try.
You can also refer to more solutions to overcome limitations in SYSTEM user account from following web pages,
>>Can I also convert the first page of a pdf upload?
If you wish convert first page of PDF file to image file, you can use VeryPDF PDF to Image Converter Command Line software,
>>What sort of licensing needs to be purchased? We plan to host this portal on Godaddy server sometime in July.
You need to purchase DOC to Any Converter Command Line Server License,