DJ
Davis Jebaraj
Syncfusion Team
February 16, 2005 09:34 AM UTC
Hi Paddy,
Thank you for your interest in Essential HTMLUI. I am working on the issues you have raised and I will respond to them within the next few hours.
Thank you for your patience.
Regards,
Davis
PA
Paddy
February 16, 2005 11:36 AM UTC
Hi Davis,
thanks for letting me know, I see that my examples of html got rendered in my message. If you need clarification on any point, don’t hesitate to ask.
Paddy.
DJ
Davis Jebaraj
Syncfusion Team
February 18, 2005 09:59 AM UTC
Hi Paddy,
Sorry about the delay in responding.
1. Bookmarks: Thank you for bringing this issue to our attention. I have informed the development team about this problem and they should be adding support for bookmarks.
2. Cancelling navigation: I am working on this issue. I will update this thread again.
3. Adding html to a document being displayed: To change the formatting of an element, we support applying HTMLformat objects to the HTMLElements directly. This feature was added recently and is not available in the public version. I will send you a version with this change along with the fixes for the other issues. We will also rectify the problem with the InnerHTML property not being updated properly.
4. Rendering to a different Graphics object using the IHTMLInput.Draw method: I am working on this issue. I will update this thread again.
5. Changing the border width: Yes. We will change the behavior so that it is aligned to the left and also make it configurable.
Thank you for your patience.
Regards,
Davis
DJ
Davis Jebaraj
Syncfusion Team
February 19, 2005 12:10 AM UTC
Hi Paddy,
An update regarding issue 2: Cancelling navigation. There is currently no way to do this. We will add a event that allows intercepting and cancelling the link click action. We will also add support for a URILoader model so that any type of URI can be handled as needed by the developer.
Item 5: Rendering to a different Graphics object. Could you please try this code at your end and let me know:
Image img = new Bitmap(this.htmluiControl1.AutoScrollMinSize.Width , this.htmluiControl1.AutoScrollMinSize.Height );
Graphics g = Graphics.FromImage (img);
IInputHTML doc = this.htmluiControl1.Document;
PaintEventArgs ea = new PaintEventArgs(g,new Rectangle(0,0,img.Width,img.Height));
doc.Draw(ea,Point.Empty);
Clipboard.SetDataObject( img );
Thanks,
Davis
PA
Paddy
February 21, 2005 12:05 PM UTC
Hi Davis,
Thank you for your responses, it’s nice to see that
Syncfusion seem committed to extending the HtmlUIControl. Thank you for your
example for drawing on another graphics object. It worked perfectly, I should
have been clearer on what we were doing however. We were tying to draw on the
graphics object of a page in the PrintPreviewDialog. Here’s the code we are
using. I’ve escaped the html to avoid rendering this time.
private void printDocument1_PrintPage(object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
// Use IInputHTML.Draw to draw on the page''s graphics object.
// adjust the dimentions of the control to match e.MarginBounds width & height.
// so that it renders to the correct dimentions.
htmluiControl1.Width = e.MarginBounds.Width;
htmluiControl1.Height = e.MarginBounds.Height;
// Give the HtmlUIControl somthing to render.
string html = "
The quick brown fox jumps over the lazy
dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
" The quick brown fox jumps over the lazy dog." +
"
";
htmluiControl1.LoadFromString(html);
Syncfusion.Windows.Forms.HTMLUI.IInputHTML doc = htmluiControl1.Document;
Point startPoint = new Point(e.MarginBounds.X, e.MarginBounds.Y);
PaintEventArgs args = new PaintEventArgs(e.Graphics, e.MarginBounds);
doc.Draw(args, startPoint);
// Show the margins
e.Graphics.DrawRectangle(Pens.Red, e.MarginBounds);
e.HasMorePages = false;
}
We tried this code with three different printer drivers and a variety of
different paper sizes. In most cases, the text on the far right gets clipped.
This also happens if we produce a hard copy.
In your response about the html formatting issue (point 3) you state that the
feature was added in a newer version. You then said "I will send you a version
with this change along with the fixes for the other issues." Could you please
clarify what you meant? Did you mean you''d send me a copy of the new control or
not?
One final point, we noticed that when displaying mixed formatting on the same
line, the text gets a lot of white space around it. Do you plan on fixing this
problem?
Thanks again for taking the time to respond,
Paddy.