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
Print Templates not working
Posted by: Bob Lail (---.lcms.org)
Date: Tuesday, 23-Aug-2005, 20:51:20

Hi,
I'm trying to use print templates with the HtmlEditor, but they aren't working at all. I downloaded a fresh copy of the editor from this site, loaded the DemoHtmlApp, and placed the following code in the body of the btnPrint_Click event handler:

using( OpenFileDialog dialog = new OpenFileDialog() )
{
dialog.ShowDialog();
htmlEditor1.Print(true,dialog.FileName);
}

I tried several of the sample print templates from the article "Beyond Print Preview..." but the print preview dialog always looks the same.

I'm running IE 6.0.2900.2180 and have installed .NET beta 2.0 (however I compiled that experiment in Visual Studio 2003.

Any ideas? Any suggestions?

Thanks,
Bob

Re: Print Templates not working
Posted by: Tim (---.gotadsl.co.uk)
Date: Wednesday, 24-Aug-2005, 09:37:48

Bob,

It's a small bug. You can either include the 3rd argument (bPromptUser), or amend this override in HtmlEditor.cs:

public void Print(bool bPreview, String sTemplatePath)
{
this.Print(bPreview,sTemplatePath,true);
}

Currently it always passes an empty string as the template path.

Tim

Re: Print Templates not working
Posted by: Bob Lail (---.lcms.org)
Date: Wednesday, 24-Aug-2005, 15:32:51

Thanks!
I'm back in businesssmiling smiley



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.
3K7HC
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.