HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Printing
Posted by: Winger300 (---.nott.cable.ntl.com)
Date: Monday, 07-Jul-2003, 11:13:49

I cannot seem to Print anything.

The line....

iRetval = ct.Exec(ref pguidCmdGroup,ComSupport.IDM_PRINTPREVIEW,iPromptUser,ref pvaIn,ref pvaOut);

get executed, but for some reason i never see a Print dialog, and nothing prints.

If i Ctrl-N a new Internet Explorer window opens, with the document displayed, but again it wont print from Explorer.

Re: Printing
Posted by: Tim (---.server.ntl.com)
Date: Monday, 07-Jul-2003, 11:21:41

What's the return value?

Are you passing in any value for a print template?

Presumably IE can print if you use File - Print?

Tim

Re: Printing
Posted by: Winger300 (---.nott.cable.ntl.com)
Date: Monday, 07-Jul-2003, 12:33:55

IE can print using File-Print, but when i open IE from my web control, and do a File-Print it wont.

However, i have rooted out the problem to be in MSHTML.

Im using the dll i created using tblimp, using the Microsoft.mshtml interop library works fine. Solves my problem.

Thanks

Re: Printing
Posted by: marc (---.merrillcorp.com)
Date: Monday, 06-Mar-2006, 17:24:59

Not sure what you mean by "using the Microsoft.mshtml interop library works fine" do you have furhur info?

Re: Printing
Posted by: Tim (---.gotadsl.co.uk)
Date: Monday, 06-Mar-2006, 17:43:54

The primary interop assembly for MSHTML, which comes with Visual Studio.

Tim

Re: Printing
Posted by: marc (---.merrillcorp.com)
Date: Monday, 06-Mar-2006, 20:31:22

Wouldn't happen to have a code example of what you did kicking around?

Re: Printing
Posted by: marc (---.merrillcorp.com)
Date: Monday, 06-Mar-2006, 22:29:54

Ultimately I am looking for a way to print a web page to a printer OTHER than the default printer - which either has been added as a printer OR not. I am looking to do this using the AxWebBrowser or the MSHTML library. Is this what we are talking about here and if not any other ideas?

Re: Printing
Posted by: Tim (---.gotadsl.co.uk)
Date: Monday, 06-Mar-2006, 22:38:58

As I recall, this is really difficult. Two techniques on offer are equally ugly:

a) change the default printer in the registry, print, change it back.

b) find some way to automate the print dialog

I once read a Microsoft tech note on the subject but I'm not sure I can track it down quickly.

Tim



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
CJKGe
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.