• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 950
  • Last Modified:

VB.net WebBrowser control printpreview ugly scaling/zooming

The PrintPreview dialog of webbrowser control has really ugly scaling - it often shows some borders wider and some narrower, etc, the preview just looks ugly (but it prints correctly). On the other hand, the print preview directly from Internet Explorer looks great. These should be the same PrintPreview dialogs - I don't get it. How can I fix it? (And please do not bother answering if you are not sure what I'm talking about :)
0
JiriNovotny
Asked:
JiriNovotny
1 Solution
 
TMarkham1Commented:
Which WebBrowser control are you referring to? The Managed code version (which is essentially a wrapper to the original ActiveX control included in the .Net Framework 1.x), or the ActiveX control itself?

Honestly, I tried using the managed code WebBrowser control in .Net 2.0, but eventually got frustrated with it's lack of flexibility. It's nice for quick and dirty browser support in your windows applications, but if you're looking to do more than just the basics you'll soon discover that you'll need to write your own managed code wrapper to the ActiveX control... which, let me tell you isn't easy.

That said, it wouldn't surprise me if Microsoft's managed code WebBrowser control used a different Print Preview dialog than the one used in Internet Explorer. To tell you the truth, I hadn't noticed a difference, but that could be because I wrote my own wrapper and possibly told the ActiveX control to perform its default action for the Print Preview command... which would be to bring up the Print Preview dialog of IE. I'd have to test this on Monday and get back to you because now I'm curious.

If this turns out to be the case, and if there's a way to handle overriding just the Print Preview without having to rewrite bloody everything like I did, I'll share that too.
0
 
JiriNovotnyAuthor Commented:
Eventually I figured out I can force a different version of IE renderer to be used in the print preview, which has partially fixed my problem. I also maximize the print preview window which helps. Thanks for your input.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now