Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents from any .NET(C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Wed May 29, 2019 3:58 pm

Hello. I am trying to get a font height from one of layout shapes and getting NaN every time.

Here is an XML shape description:
Code: Select all
-<p:sp>
-<p:nvSpPr>
<p:cNvPr name="Text Placeholder 10" id="11"/>
-<p:cNvSpPr>
<a:spLocks noGrp="1"/>
</p:cNvSpPr>
-<p:nvPr>
<p:ph type="body" sz="quarter" hasCustomPrompt="1" idx="10"/>
</p:nvPr>
</p:nvSpPr>
-<p:spPr>
-<a:xfrm>
<a:off y="5867400" x="577850"/>
<a:ext cy="762000" cx="5200650"/>
</a:xfrm>
</p:spPr>
-<p:txBody>
<a:bodyPr anchor="b"/>
-<a:lstStyle>
-<a:lvl1pPr>
-<a:defRPr sz="900">
<a:latin charset="0" pitchFamily="34" typeface="Arial"/>
<a:cs charset="0" pitchFamily="34" typeface="Arial"/>
</a:defRPr>
</a:lvl1pPr>
</a:lstStyle>


So I am trying to reach the line:

Code: Select all
-<a:defRPr sz="900">


How and can I do that?

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Thu May 30, 2019 3:31 am

Dear Adam,

Thank your for contacting us.
Kindly note that the <a:defRPr sz="900"> represents the default font size of text. Sorry for the fact that our Spire.Presentation does not support getting the default font size at present. That's the reason why you get NAN. We have already added it as a new feature into our upgrade list. Once it is achieved, I will inform you. Apologize for the inconvenience. In addition, could you please share us with your testing PowerPoint file? So that we can better test your case when the feature is done. Thanks in advance.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1135
Joined: Tue Sep 27, 2016 1:06 am

Mon Jun 03, 2019 6:53 am

Hi, about when it is going to be implemented?

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Mon Jun 03, 2019 7:31 am

Hi,

Sorry I can't provide an accurate timeline about when the feature could be implemented at this moment. Our Dev team is working on the feature now and I have requested our Dev team to share any possible estimated time at their earliest. I will keep you informed once it is finished or I get any feedback from our Dev team. Thanks for your cooperation.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1135
Joined: Tue Sep 27, 2016 1:06 am

Thu Jul 04, 2019 9:57 am

Dear Adam,

Glad to inform you that the default font size could be obtained now, welcome to download the release Spire.Presentation Pack Version:4.7 and use the following code to have a test.
Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile(filepath);
var autoShape = (IAutoShape)ppt.Slides[0].Shapes[0];
var fontHeight = autoShape.TextFrame.Paragraphs[0].TextRanges[0].FontHeight;

Sinecerly,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1135
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.Presentation