Hello. I use follow code for copy plot area position:
var presentation1 = new PresentationEx(@“D:\shapes\1.pptx”);
var presentation2 = new PresentationEx();
var shape1 = (from SlideEx slide in presentation1.Slides
from ShapeEx shape in slide.Shapes
select shape).First();
ChartEx chart1 = (ChartEx)shape1;
presentation2.SlideSize.Size = presentation1.SlideSize.Size;
var chart2 = presentation2.Slides[0].Shapes.AddChart(chart1.Type, 0, 0, chart1.Width, chart1.Height);
chart2.PlotArea.Width = chart1.PlotArea.Width;
chart2.PlotArea.Height = chart1.PlotArea.Height;
chart2.PlotArea.X = chart1.PlotArea.X;
chart2.PlotArea.Y = chart1.PlotArea.Y;
//CopyProperties(chart2, chart1);
presentation2.Save(@“D:\shapes\2.pptx”, SaveFormat.Pptx);
but into result file (2.pptx) PlotArea has difference position and size.
Could you help me?
1.pptx attached.