We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

html converted into table

Thread ID:

Created:

Updated:

Platform:

Replies:

103536 May 10,2012 09:15 AM UTC May 11,2012 06:34 AM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: PDF
Noam Sadot
Asked On May 10, 2012 09:15 AM UTC

hi
 
we managed with html converting , i didnt find any example of how to create custom pfdlighttable
and add for each cell the converted html
 
do you have any help about it?

Geetha M [Syncfusion]
Replied On May 11, 2012 06:34 AM UTC

Hi Noam,

Thank you for your interest in Syncfusion products.

You can draw the converted HTML content in the BeginCellLayout Event of PdfLightTable. The following code snippet illustrates this:

/// <summary>

/// Convert HTML string to PDF and update.

/// </summary>

void lightTable_BeginCellLayout(object sender, BeginCellLayoutEventArgs args)

{

    if (args.RowIndex > -1)

    {

        width = unitConvertor.ConvertToPixels(args.Bounds.Width, PdfGraphicsUnit.Point);

        using (HtmlConverter converter = new HtmlConverter())

        {

            Metafile mf = (Metafile)converter.FromString(dataString[args.RowIndex], ImageType.Metafile, (int)width, -1);

            args.Graphics.DrawImage(new PdfMetafile(mf), args.Bounds);

        }

    }

}

I had placed the sample below.

Please try this and let us know if you have any questions.

Regards

Geetha



LightTable_HTML_cc867728.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;