doc2img.dll Library. An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

When i am trying to run doctoprint converter the dll used in the program doc2img.dll is throwing above error"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)". Please five the solution ASAP.

Customer
-------------------------------------------------
doc2img.dll is a 32bit DLL library, you can't call it from 64bit EXE application, you may compile your source code with x86 platform to try again.

VeryPDF
-------------------------------------------------
Thanks for the answer. Will it surely fix the issue? To compile my source code what I have to do? My application is already build on 64bit machine and I installed doctopdf converter on 64bit machine but, I took doc2img.dll from 32 bit machine because I did not find this dll after installing converter on 64bit machine. Please let me know where I can find this dll on machine for 64 or let me know if I am wrong somewhere. Please provide your solution ASAP it's very urgent. 

Customer
-------------------------------------------------
On the 64bit machine, you can use docPrintCom.exe to instead of doc2img.dll, docPrintCom.exe is a COM interface, it can be called from both 32bit and 64bit EXE applications.

You can run a CMD window by administrator privilege first, and run following command line to register docPrintCom.exe on 64bit system,

"C:\Program Files (x86)\docPrint Pro v6.0\docPrintCom.exe" /regsrever

Then you can use following VBS code to call "docPrintComExe.docPrint" to convert office files to PDF files,
----------------------------------
strLicenseKey = "XXXX-XXXX-XXXX-XXXX"

set docPrintObj = CreateObject("docPrintComExe.docPrint")
'nRet = docPrintObj.docPrintCOM_DocumentConverter("D:\temp\test.docx", "D:\temp\out.pdf", "-* " & strLicenseKey)
'nRet = docPrintObj.RunCmd("-* " & strLicenseKey & " -i D:\temp\test.docx -o D:\temp\out2.pdf", 1)

'Please run "docPrint_Service.exe" application before you call this function
nRet = docPrintObj.RunCmdViaDocPrintService("-* " & strLicenseKey & " -i D:\temp\test.docx -o D:\temp\out2.pdf", 1, strLicenseKey)
----------------------------------

OR

----------------------------------
strInputFile = "http://www.verypdf.com"
strLicenseKey = "XXXX-XXXX-XXXX-XXXX"

Set fso = CreateObject("Scripting.FileSystemObject")
strFolder = fso.GetParentFolderName(wscript.ScriptFullName)
strOutputFile = strFolder & "\output.pdf"

Set docPrint = CreateObject("DocPrintComExe.docPrint")
nRet = docPrint.docPrintCOM_Register(strLicenseKey, "VeryPDF.com Company")
nRet = docPrint.RunCmd("-i " & strInputFile & " -o " & strOutputFile & " -* " & strLicenseKey & " -s ""htmlheader=VeryPDF Page Header"" -s ""htmlfooter=VeryPDF Page Footer""", 1)

If (fso.FileExists(strOutputFile)) Then
msg = strOutputFile & " exists."
Else
msg = strOutputFile & " doesn't exist."
End If
MsgBox msg
----------------------------------

"docPrintComExe.docPrint" is a COM component, you can arrange it run inside any user account, for example, you can set it run inside Administrator user account to avoid permission problems, please look at following web page for more information,

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

http://www.verypdf.com/wordpress/201403/verypdf-release-notes-verypdf-has-release-a-new-docprintcomexe-for-docprint-sdk-product-40311.html

docPrintCom.exe is "docPrintComExe.docPrint",
VeryPDFComRunCmd.exe is "VeryPDFCom.RunCmd",

They are similar COM components, but not same, you can choose either one.

VeryPDF

VN:F [1.9.20_1166]
Rating: 10.0/10 (3 votes cast)
VN:F [1.9.20_1166]
Rating: +1 (from 1 vote)
doc2img.dll Library. An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B), 10.0 out of 10 based on 3 ratings

Related Posts

This entry was posted in docPrint Pro 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!