- Home
- Internet Explorer 6
- Print Preview displays html code instead of displaying the page preview
Print Preview displays html code instead of displaying the page preview
- Copyright © 2008 Ramesh Srinivasan
- Internet Explorer 6
Symptom
When you choose Print Preview from Internet Explorer File menu, the Preview dialog appears correctly, but may show the raw html code instead of displaying the preview.

Resolution
Click Start, Run and execute these commands:
- regsvr32 /i mshtml.dll
- regsvr32 /i shdocvw.dll
If you enjoyed this post, make sure you
subscribe to our RSS feed!
We feature Tips, Troubleshooting information, Scripts and Utilities for Microsoft Windows Operating Systems!
Prefer an E-mail subscription?
14 Responses to "Print Preview displays html code instead of displaying the page preview" 
|
said this on 18 Feb 2007 5:14:04 PM PDT
Just try this........
Open Internet Explorer
Click on tool and select Internet options.
Select General tab and click on Accessibility button.
Check the box "Ignore font styles specified on Webpages" and "Ignore font sizes specified on Webpages" and click on OK.
|
|
said this on 25 Feb 2007 6:38:51 PM PDT
Tried all these and nothing works....help!
|
|
said this on 15 Apr 2007 3:16:04 PM PDT
I know it's been a while since this thread when idle, but I had this same problem and could not find any solution to it. The strange part was it worked ok for one user but not for another. And it was driving my wife (the user with the problem) crazy!
The key was that the file type association was missing for the user with the problem. I tried to add it through "folder options" but it would not "stick" even though the user was an administrator.
I tried to edit the registry manually (as the problem user) and found that I could not edit the HKEY_CLASSES_ROOT.htm (or .html) registry keys. It said I didn't have permission! By going back to the user that didn't have the problem I found that the registrey key permissions were wrong (excluding everyone but the working user). When I set them back to something normal (using a nearby registry key as a template) everything worked again.
I have no idea how this all happened, and can't imagine that this is what is causing other people's grief, but it's worth a look.
|
|
said this on 26 Sep 2007 3:07:33 PM PDT
I helped my daughter with html print preview by internet options,advanced tab,security tab,
tick let avtive content run on my computer
|
|
said this on 21 Jan 2008 3:49:30 PM PDT
I WISH my problem was limited to te preview window, but it is the opposite - Preview appears to be fine, but the actual printing is all HTML
|
|
said this on 29 Mar 2008 1:31:37 PM PDT
Have seen this on a few different workstations recently. In most cases registering the DLL's fixed the problem, but in one case received an error when trying to register mshtml.dll that an entry load point was not found and the DLL does not load (something to that effect). What fixed the problem was using the Set Program Access Controls from the Start Menu (or top of All Programs list) and changing Default Browser to IE. After doing this Print/Preview no longer in html code.
|
|
said this on 03 Jul 2008 2:42:54 PM PDT
Beautiful!!! That worked perfectly for me. Everyone, try changing your default browser to Internet Explorer.
|
|
said this on 29 Jul 2008 6:15:16 AM PDT
Running the commands did not make a difference - I also experienced the error with mshtml.dll as explained by Cameron.
However, setting IE as the default browser worked perfectly.
Note: The browser only began to print HTML code after installing Tiscali settings.
|
|
said this on 26 Aug 2008 6:21:39 PM PDT
This steps Worked for me:
Please click on Start, Click on Run and type the following in the open box and click OK
regsvr32 jscript.dll
regsvr32 vbscript.dll
regsvr32 /i shdocvw.dll
There is a space between regsvr32 and /i and shdocvw.dll
regsvr32 /i mshtml.dll
There is a space between regsvr32 and /i and mshtml.dll
Then tried the steps:
Open Internet Explorer Click on tool and select Internet options
Under General tab and click on Accessibility button
Check the box "Ignore font styles specified on Webpages" and "Ignore font sizes specified on Webpages" and click on OK.
Click on OK
Then close Internet Explorer
Then set IE as default:
Click Start, and then click Control Panel.
Click Add or Remove Programs
Click on Set Program Access and Defaults.
Select the Custom pull down list
expand the Custom section by clicking on the down arrow
In the Choose a default Web browser: section, choose Internet Explorer, then Select the "enable access to this program checkbox"
if you could not select ""enable access to this program checkbox", just select Internet Explorer and click OK
Close all Internet Explorer window and try again.
It worked for me.!!!
If the OS is Vista, you may try disabling Protected Mode
Follow the steps below to disable protected mode:
-Open Internet Explorer 7.
-Select Tools.
-Select Internet Options.
-Select the Security tab.
-Select the Internet zone.
-Uncheck Enable Protected Mode.
-Select OK.
It worked.!!!
|
|
said this on 29 Aug 2008 2:00:52 PM PDT
I was having the same issue, printer only printing html source code from IE 7. Under Tools-->Internet Options--> Programs Tab, I made IE the default browser as suggested above. Also the "Default HTML editor" field was blank. I used MS Publisher.
This is probably just anecdotal evidence, but try making sure there is a program in that field. Hope this helps someone.
|
|
said this on 19 Sep 2008 5:31:23 PM PDT
YES! Changing Internet Explorer to the default browser via the Control Panel (Internet Options/Programs) solved the printing with all the html code all the time when I just wanted the web page to print. Finally! Thank you for posting this solution.
|
|
said this on 15 Oct 2008 4:42:41 PM PDT
Thank you to all of you who suggested changing IE to the default browser! It worked wonderfully!
|
|
said this on 27 Oct 2008 1:45:10 PM PDT
Changing IE to default browser definitely helps! thanks!!
|
|
said this on 04 Feb 2009 1:07:01 AM PDT
Thank you, the changing the default browser worked!
|

Author)