Free Support Forum - aspose.com

HeaderFooter - Font Details

Hi,

How can i get the font details like style , weight, colour for HeaderFooter object.

Regards
J.Karthikeyan


To get the formatting styles, you need to find out the footer shape on the master slide and then gets its textframe, paragraph and portion

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

e.g

Shape footerShape=masterSlide.findShape(“footershape”); //Assume, footer shape’s alternative text has been set in MS-PowerPoint

Or

Shape footerShape=masterSlide.getShapes().get(3); //Normally, the fourth shape is footer shape

Then get its textframe, pargraph and portion to get the text formatting.

TextFrame tf=footerShape.getTextFrame();

Pargraph para=tf.getParagraphs().get(0);

Portion port=para.getPortions().get(0);

The more easy and sure way to find footer shape among the shapes in master slides is to make use of TextFrame property TextFrame.getMetaCharacters()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

The TextFrame.getMetaCharacters().get(0) will return you MetaCharacterType

And this will give you clue, if the shape is footer, date or slide number, the values of MetaCharacterType can be seen at this link.

http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/com/aspose/slides/metacharactertype.html

Hi,

Thanks for the reply.

Regards
J.Karthikeyan