Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Thu Aug 27, 2015 9:38 am

I am looking for logo change in slide master, but i am unable to reach out to slide master.

Please help me to reach out to slide master.

amitk.mishra
 
Posts: 5
Joined: Thu Aug 27, 2015 9:30 am

Fri Aug 28, 2015 7:40 am

Hello,

Thanks for your inquiry.
Here is the code for your reference.
Code: Select all
     Presentation presentation = new Presentation();       
            presentation.LoadFromFile(path + "5685.pptx");
            IMasterSlide master = presentation.Masters[0];
            int count=master.Shapes.Count;
            for (int i = 0; i < count; i++)
            {
                IShape shape = master.Shapes[i];
                if (shape is IEmbedImage)
                {   
                    String image = path + "new.png";
                    RectangleF rff = new RectangleF(shape.Left, shape.Top, shape.Width, shape.Height);
                    master.Shapes.RemoveAt(0);
                    master.Shapes.AppendEmbedImage(ShapeType.Rectangle, image, rff);               
                }             
            }
            presentation.SaveToFile("result-1.pptx", FileFormat.Pptx2010);


Best Regards,
Sweety
E-iceblue support team
Last edited by sweety1 on Mon Aug 31, 2015 5:37 am, edited 1 time in total.
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Fri Aug 28, 2015 9:08 am

Thanks for your reply !

can you please let me know that how can i change title color in master slide due to it can be applied in all slides?

amitk.mishra
 
Posts: 5
Joined: Thu Aug 27, 2015 9:30 am

Mon Aug 31, 2015 9:21 am

Hello,

Thanks for your reply.
So sorry that our product doesn't support this feature at this stage. We will consider adding it in our future upgrade.

Best Regards,
Sweety

E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Mon Aug 31, 2015 10:05 am

Thanks for reply !

amitk.mishra
 
Posts: 5
Joined: Thu Aug 27, 2015 9:30 am

Mon Oct 05, 2015 7:27 am

Hi,

Please let me know that how can i get "Pentagon" shape as i want. Please see attachment and let me know that how can i get such type of Pentagon.

For this currently i am using "ShapeType.RightArrow" but i am not getting such type of shape.

Please help !

Thanks
Amit

amitk.mishra
 
Posts: 5
Joined: Thu Aug 27, 2015 9:30 am

Tue Oct 06, 2015 4:48 am

Hello,

Our Spire.Presentation doesn't support the feature at present, but we will add it as new feature into our schedule.
We will inform you when it is supported.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Wed Oct 07, 2015 9:47 am

Hi,

Please let me know that how can i set a text to Vertical alignment "Top" in Rectangular Shape.

Thanks
Amit

amitk.mishra
 
Posts: 5
Joined: Thu Aug 27, 2015 9:30 am

Thu Oct 08, 2015 3:49 am

Hello,

Please use the following code snippet to set a text to Vertical alignment "Top" in Rectangular Shape before setting its text.
Code: Select all
Shape.TextFrame.AnchoringType = TextAnchorType.Top;

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Oct 30, 2015 5:24 am

Hi Amit,

Sorry for the delay response, we supports the shape as the attached showed.
Share sample code:
Code: Select all
  IAutoShape shape = ppt.Slides[0].Shapes.AppendShape(ShapeType.HomePlate, new RectangleF(50, 100, 100, 100));
            shape.Fill.FillType = FillFormatType.Solid;
            shape.Fill.SolidColor.Color = Color.White;
            shape.ShapeStyle.LineColor.Color = Color.Black;


Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Fri Oct 30, 2015 8:28 am

Hello,

You can change title color in master slide, here are the code snipet for your reference.
Code: Select all
IMasterSlide ms = pre.Masters[0];
        for(int i=0;i<ms.Shapes.Count;i++)
        {
            if(ms.Shapes[i] is IAutoShape)
            {
                 IAutoShape shape = (IAutoShape)ms.Shapes[i];
                 if(shape.TextFrame.Text == "Click to edit Master title style")
                  {
                     shape.Fill.FillType = FillFormatType.Solid;
                     shape.Fill.SolidColor.KnownColor = KnownColor.Red;
                     TextParagraphProperties tpp = shape.TextFrame.TextStyle.GetOrCreateListLevelTextStyle(0);
                     tpp.DefaultTextRangeProperties.IsBold = TriState.True;
                     tpp.DefaultTextRangeProperties.FontHeight = 25;
                     tpp.DefaultTextRangeProperties.Fill.FillType = FillFormatType.Solid;
                     tpp.DefaultTextRangeProperties.Fill.SolidColor.KnownColor = KnownColor.Red;
                  }
            }
       }

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Nov 03, 2015 3:39 am

Hello,

Have your issues been resolved?
Thanks for your feedback.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2774
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Presentation