質問

I am trying to use Aspose Slides to generate a presentation using a template PPTX with a master slide and some layout slides that contain placeholders. I want to make the slides conform to different themes that the user will select.

I use a code similar to this one: http://www.aspose.com/community/forums/permalink/467028/466709/showthread.aspx#466709 ..and the shapes seem to go to the position of the placeholder.

However some fonts and most (if not all) of the background and border colors are not being copied from the placeholder. For example, all the Rectangles that I add, have a blue background and border and not what I use on the placeholder. What I am suspecting is that the Aspose people set those styles to the Rectangle as initial values, so the shape doesn't pick them from the placeholder.

I have asked this question in the Aspose Forum, but it takes them centuries to respond. Has anyone done anything similar with success? Am I the first that uses Aspose Slides for templating?!?! There doesn't seem to be much info on the web about this stuff. There's only some info on text placeholders but I don't deal with text only here (I have charts, tables and titles)...

And I don't think I can handle efficiently even titles with normal text placeholders...

EDIT:

What I get when I insert a new Rectangle in my PPTX, is a Rectangle (thank God!) that has a border and a background EXACTLY similar to the one in the demo here: http://www.aspose.com/docs/display/slidesnet/Creating+a+TextBox+on+SlideEx

That's why I suspect that Aspose is responsible for this problem. When you set a property for a shape it doesn't use the value from the placeholder. I don't think these blue colors are PowerPoint's default colors...

I have tried setting these values to NotDefined like so:

lAshp.FillFormat.FillType = FillTypeEx.NotDefined;
lAshp.FillFormat.SolidFillColor.ColorType = ColorTypeEx.NotDefined;
lAshp.LineFormat.FillFormat.FillType = FillTypeEx.NotDefined;
lAshp.LineFormat.FillFormat.SolidFillColor.ColorType = ColorTypeEx.NotDefined;

..and nothing changes.

役に立ちましたか?

解決

Here is the Aspose forum topic:

http://www.aspose.com/community/forums/468796/textbox-title-not-picking-up-the-placeholder-s-style/showthread.aspx

Any news will be posted there (I guess).

Cheers!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top