add css for stitext

Stimulsoft Reports.NET discussion
Post Reply
silade
Posts: 16
Joined: Thu Feb 05, 2009 2:03 am

add css for stitext

Post by silade »

Code: Select all

 StiComponentsCollection components = report.GetComponents();
 foreach (StiComponent component in components)
 {
      if (component is StiText)
       {
            (component as StiText).Font = new System.Drawing.Font("Arial", (component as StiText).Font.Size,FontStyle.Bold);
       }
 }
This is my Code.But It can not display the text of StiText in safari browser on mac computer if I use StiReport.ExportDocument(StiExportFormat.Pdf, filepath, (StiExportSettings)settings) to export the report.

But if remove the FontStyle.Bold,it can work well.So I think it is the cause of the FontStyle.Bold.I want to change the css style of the stitext.But I do know how to add
css to a stitext ,e.g font-weight.Could I do this ?Thank you!

Code: Select all

StiComponentsCollection components = report.GetComponents();
foreach (StiComponent component in components)
{
      if (component is StiText)
      {
            (component as StiText).Font = new System.Drawing.Font("Arial", (component as StiText).Font.Size);
      }
}
silade
Posts: 16
Joined: Thu Feb 05, 2009 2:03 am

add css for stitext

Post by silade »

Hello!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

add css for stitext

Post by Andrew »

Hello,

Please send us to support@stimulsoft.com the .MDC file of the document and problem .PDF files for analysis.

Thank you.
Post Reply