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.
Syncfusion Feedback

PDF Tables Fonts

Thread ID:

Created:

Updated:

Platform:

Replies:

112388 Sep 19,2013 09:32 AM Oct 3,2013 12:06 AM Windows Forms 5
loading
Tags: PDF
Peer Fribo Jensen
Asked On September 19, 2013 09:32 AM

I am trying to use this code for changes the font inside cells

 

void tblPDF_BeginCellLayout(object sender, BeginCellLayoutEventArgs args)

{

 

 

var csfont = new Font("Arial", 8.0f);

var cspdfFont = new PdfTrueTypeFont(csfont, true);

var font = new Font("Calibri", 8.0f);

var pdfFont = new PdfTrueTypeFont(font, true);

if (args.CellIndex == 2)

 

 

 

 

{

 

(sender as Syncfusion.Pdf.Tables.PdfLightTable).Style.DefaultStyle.Font = cspdfFont;

 

 

}

 

else

 

 

{

 

(sender as Syncfusion.Pdf.Tables.PdfLightTable).Style.DefaultStyle.Font = pdfFont;

 

 

}

}

 

But the font is not changes at all! Any Ideas?


KarthikeyanC [Syncfusion]
Replied On September 23, 2013 06:08 AM

Hi Peer,

Thank you for using Syncfusion Products.

 

We can able to change the font for each cell in the PdfLightTable, I have attached a sample project which satisfied your requirement. Please let us know if you need any further assistance.

PdfLightTableVB.zip

 

Thanks.

Karthikeyan.C


Peer Fribo Jensen
Replied On September 26, 2013 03:24 PM

Yes it works fine. But is does not work for C#. Do you have an example for C#?


KarthikeyanC [Syncfusion]
Replied On September 30, 2013 11:41 PM

Hi Peer,

Thank you for your update.

I have attached a C# sample for your reference, please find the attachment below.

PdfLightTable.zip

Please let us know if you need any further assistance.

Thanks,

Karthikeyan.C


Peer Fribo Jensen
Replied On October 1, 2013 08:40 AM

Thanks for the solutions. It works file. But if I use the PDFViewer, the solutions does not  shown a TrueType font!


KarthikeyanC [Syncfusion]
Replied On October 3, 2013 12:06 AM

Hi Peer,

Thank you for your update.

 

Could you please create a Direct Trac incident with the title “Forum-112388- PdfViewer does not show a True Type font” along with the input Pdf Document. So that it will be easy for us to investigate in this.

 

Please let us know if you have any queries.

 

Thanks,

Karthikeyan.C


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

;