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. Image for the cookie policy date
close icon

PDFLightTable cell formatting

hello everyone,

does anyone know how to draw a text in a PDFLightTable cell or header vertical?


7 Replies

BP Bhuvaneswari P Syncfusion Team April 2, 2009 01:31 PM UTC

Hi,

Thank you for your inquiry.

To format the PDFLightTable cell please use the BeginCellLayoutEvent. Please find the sample from the below location regarding this.

{Installed version}\My Documents\Syncfusion\EssentialStudio\7.1.0.30\Windows\Pdf.Windows\Samples\2.0\Tables\Table Features

Online documentation regarding this:
http://help.syncfusion.com/ug_71_new/pdf/TableCustomization.html

But we don't have support to display the Table header in Vertical format. Please let me know if you have any other questions.

Best Regards,
Bhuvana




MK Manuel Koch April 2, 2009 02:42 PM UTC

thx for ur fast reply.

i think i will solve theproblem by drawing the text into the cells.

where i am by my next problem, how can i convert a pdffont to and system font?

hope someone can help me.



BP Bhuvaneswari P Syncfusion Team April 3, 2009 01:09 PM UTC

Hi Reaper,

Thanks for the update.

It is not possible to convert the PdfFont to System Font. Since Font class is differ from PdfFont class. Its not inherited from Font class. One possible ways is check like below and convert to the system font, but its not possible to convert all the properties to System font properties.

PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
Font f = new Font(font.Name,font.Size );

Please let me know if you have any other questions.

Best Regards,
Bhuvana



MK Manuel Koch April 6, 2009 12:44 PM UTC

how to draw an image into a cell of a pdflighttable that the row fit to the imagesize?

thx
Reaper



BP Bhuvaneswari P Syncfusion Team April 7, 2009 02:13 PM UTC

Hi Reaper,

Yes, it is possible to draw images in the table each row by using the BeginCellLayout event of table object. Please refers to the below code to draw image in the PDF table row.

void table_BeginCellLayout( object sender, BeginCellLayoutEventArgs args )
{
if( args.RowIndex == 10 )
{
if( args.CellIndex > 2 )
{
args.Graphics.DrawImage( m_image, args.Bounds );
}
}
}

For setting the row height based on the image height please use BeginRowLayout event handler and specify the row the height.


void SpecifyRowHeightTest_BeginRowLayout( object sender, BeginRowLayoutEventArgs args )
{

args.MinimalHeight = m_heigth;//Specify the image height here

}

Please refer to the below sample which illustrates the same:
http://www.syncfusion.com/uploads/redirect.aspx?file=PDFTable_InsertImage_6e5b21b0.zip&team=support

Please try this and let us know if you need any further assistance.

Best Regards,
Bhuvana



MK Manuel Koch April 14, 2009 08:01 AM UTC

hy everyone,

does anyone know a way how i can set a different font color for the text in a specific cell of a PdfLightTable?

Regards
Reaper



BP Bhuvaneswari P Syncfusion Team April 21, 2009 11:48 AM UTC

Hi Reaper,

Thanks for the update.

There is no direct way for this. But it can be possible by using the BeginCellLayout Event.

Please refer the below sample:
http://www.syncfusion.com/uploads/redirect.aspx?file=PDFTable_17a55026.zip&team=support

Please try this and let us know if this helps you.

Best Regards,
Bhuvana


Loader.
Live Chat Icon For mobile
Up arrow icon