Can’t convert MHTML files to PDF files, cannot open any mhtml file in IE

Without html2pdf running I am unable to replicate the issue. Is there anything in the Process logs from yesterday that would point to where the problem lies?
===================
I have just conducted some testing which indicates that when VeryPDF’s HTML2pdf application is running, Internet Explorer cannot open MHT’s files. This was done in the following way;

1. Create a batch file that calls html2pdf to create 10 different PDF’s from 10 different MHT files.
2. Run the above batch file.
3. While the above batch file is running.. Attempt to open another MHT file in internet explorer – if html2pdf is running internet explorer will display “This page cannot be displayed”.

This would explain why the “page cannot be displayed error” was seemingly random  - as this potentially is only a problem when html2pdf runs for a couple of seconds.

VeryPDF Support – Can you please try and replicate this issue  using the above steps on a system using “Windows Server 2003 R2 x86”?

===================
Can you please email to us your sample MHTML files in question? After we reproduced your problem in our system, we will figure out a solution to you shortly.

VeryPDF
===================
I have included all MHT's used to carry out testing. I have also included the batch file used to create the PDF files.

I look forward to hearing a response.

===================
Please by following steps to try again,

1. Please launch a CMD window by administrator privilege, change the current folder to the folder of "doc2pdf_com_full_v2.5",
2. Run "install_as_exe.bat" to install html2pdf.exe and pdfout.dll and DocConverter COM into your system,
3. Please make sure "doc2pdf_service.exe" is running, if "doc2pdf_service.exe" is not running, please run following command line to run it,

doc2pdf_service.exe -exe

4. Please modify "CreatePDFs.bat" file to following command lines,

html2pdf.exe "%CD%\0a15c570-fc10-439b-abfc-6318fc711ee1.mht" "%CD%\1.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\2fd9d2ab-d630-4091-ae77-910921b7bb0a.mht" "%CD%\2.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\3b96a5e5-e13e-4a1c-bc8d-4643fdfc987b.mht" "%CD%\3.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\6ce07278-f670-4a61-94d8-9145a733e0c3.mht" "%CD%\4.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\7bd9bc69-482a-41fb-8c71-80c7ce813fd5.mht" "%CD%\5.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\139ae7f5-f165-492b-ae80-8cb49ff4fa2b.mht" "%CD%\6.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\7792050e-2565-4486-936c-076c7b19b245.mht" "%CD%\7.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\56889532-72af-4f56-a87a-db29db3ca84d.mht" "%CD%\8.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\90801926-11d3-44b0-adf3-4444fc2f182c.mht" "%CD%\9.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\a7bad16c-dd87-4825-a4f3-a07a830e7894.mht" "%CD%\10.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\ea28d711-50be-4f26-a4ae-bab366fb49c8.mht" "%CD%\11.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\f5e5ffa5-34e5-4a9c-943d-dc77f6892bc4.mht" "%CD%\12.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
html2pdf.exe "%CD%\f14054a3-e553-4753-8223-95090d1989e1.mht" "%CD%\13.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
pause

5. Please run "CreatePDFs.bat" file file to do the batch conversion, then you can convert your MHTML files to PDF files properly.

You can also run following one command line to batch convert all of your MHTML or HTML files to PDF files at one time,

for %F in (D:\test\*.htm) do html2pdf.exe "%F" "%~dpnF.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"

You can also refer to following steps to batch convert lots of HTML or DOC files to PDF files at one time,
~~~~~~~~~~~~~~~~~~~~~~~
Please by following solution to batch convert lots of HTML or DOC or other documents to PDF files at one time,

1. Please run doc2pdf_service.exe as a normal Windows application by following command line,

doc2pdf_service.exe -exe

2. Please run following command line to convert all of HTML files to PDF files in D:\test folder and sub folders,

for /r D:\test %F in (*.htm) do html2pdf.exe "%F" "%~dpnF.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"

you can replace "D:\test" folder to correct folder in your system.

All of your HTML files will be converted to PDF files at one time by above command line.

if you needn't convert HTML files in sub folders, you can run following command line to convert all HTML files in D:\test folder only,

for %F in (D:\test\*.htm) do html2pdf.exe "%F" "%~dpnF.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"

you can also call following command line from Windows Service or your web applications to convert DOC file to PDF file properly,

html2pdf.exe "C:\file.Doc" "C:\file.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"
~~~~~~~~~~~~~~~~~~~~~~~

VeryPDF
===================
Thanks for the information, however, We already installed the Install_as_exe.bat outlined in steps 1,2 and 3 prior to the testing.

As you are specifying to run as service within the batch file, shouldn’t steps 1 to 3 be installing the exe as a service batch file?
==================
Please don't install doc2pdf_service.exe as a service, you can launch it as a normal windows application, the owner of doc2pdf_service.exe should be the current logged user account, such as administrator user account or admin or your name, after doc2pdf_service.exe is running as normal windows application, you can run following command line to batch convert your MHTML files to PDF files,

for %F in (D:\test\*.mhtml) do html2pdf.exe "%F" "%~dpnF.pdf" "Overwrite=yes,KillProcess=no,doc2pdf_service=yes"

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

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!