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.
Unfortunately, activation email could not send to your email. Please try again.

html converted into table

Thread ID:





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

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 02:34 AM

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.





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.

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.