How can I apply the font name,sise and color in formattedRecordArea in DPLX File?

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  How can I apply the font name,sise and color in formattedRecordArea in DPLX File?

DynamicPDF CoreSuite for .NET (v7) Forum

Hi

How can I apply the font name,sise and color in formattedRecordArea in DPLX File?

<formattedRecordArea id="reaSubscriberAddress" x="-50" y="-110" height="100" width="225" >
        <text>
          #SubscriberBusinessName#
          #SubscriberAddressLine1#
          #SubscriberAddressLine2#
          #SubscriberCity#, #SubscriberZipCode#,#SubscriberStateAbbreviation#
          #SubscriberCountryName#
          Address Service Requested
        </text>
      </formattedRecordArea>

Hi,
I got the way but still it is not working

Register font at top of the DPLX file.

  <openTypeFont name="Verdana" path="C:\Windows\Fonts\verdana.ttf"/>
  <openTypeFont name="VerdanaBold" path="C:\Windows\Fonts\verdanab.ttf"/>
  <openTypeFont name="VerdanaItalic" path="C:\Windows\Fonts\verdanai.ttf"/>
  <openTypeFont name="VerdanaBoldItalic" path="C:\Windows\Fonts\verdanaz.ttf"/>
  <fontFamily bold="VerdanaBold" boldItalic="VerdanaBoldItalic" italic="VerdanaItalic" name="Verdana" regular="Vardana"/>

then use initial style as below

  <formattedRecordArea id="reaSubscriberAddress" x="-40" y="-110" height="100" width="225" >
          <initialStyle>
          <font face="Verdana" color="#444444" size="8" />
        </initialStyle>
        <text>
          #SubscriberBusinessName#
          #SubscriberAddressLine1#
          #SubscriberAddressLine2#
          #SubscriberCity#,#SubscriberZipCode#,
          <i>#SubscriberCountryName#</i>
        </text>
      </formattedRecordArea>

But it retuns the crashing error. if I add the <i></i>
Posted by a ceTe Software moderator
Hello,

There seems to be a typo in the font info that you have added to the dplx file that could be causing the error. The name of the open type font you have specified using < openTypeFont > tag is “Verdana” but in the <fontFamily> tag you have specified it as regular=”Vardana”.

The following should be the correct font info: 
  <openTypeFont name="Verdana" path="C:\Windows\Fonts\verdana.ttf"/>
  <openTypeFont name="VerdanaBold" path="C:\Windows\Fonts\verdanab.ttf"/>
  <openTypeFont name="VerdanaItalic" path="C:\Windows\Fonts\verdanai.ttf"/>
  <openTypeFont name="VerdanaBoldItalic" path="C:\Windows\Fonts\verdanaz.ttf"/>
  <fontFamily bold="VerdanaBold" boldItalic="VerdanaBoldItalic" italic="VerdanaItalic" name="Verdana" regular="Verdana"/>

Please note that this thread is related to ReportWriter product and is incorrectly posted in Generator forum. It has been moved to the ReportWriter Forum

Thanks,
ceTe Software Support Team.
Hi,

Thanks for your observation, I have corrected the spelling mistake, now I can apply the font which I want. but when I am applying the italic tax as below then page is crashed and not working.


 <formattedRecordArea id="reaSubscriberAddress" x="-50" y="-110" height="100" width="225" >
          <initialStyle>
          <font face="Verdana" color="#444444" size="8" />
        </initialStyle>
        <text>
          <i>  #SubscriberBusinessName#</i>
        </text>
      </formattedRecordArea>

How can I apply the bold,italic and underline tax ?
Posted by a ceTe Software moderator
Hello,

We did some testing on our end and we are able to generate PDF report by setting the different font styles like bold and italic. Below is the text which we added to the FormattedRecordArea. We used data from Products table of Northwind database for our testing.

<P>#ProductName#,<FONT PointSize="20">font size</FONT><FONT color=##f00000> color </FONT><B>bold,</B><I> #ProductName# </I><U>and underline</U></P>

Can you please send over the following details to our support team so that they can look into it further?

1.DPLX file which you are using to generate PDF report.
2.Full stack trace of error message(if you are getting any before crashing)

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 10:37 AM.