Beispiel #1
0
        public static PPTXSetting Load(string LoadPath)
        {
            PPTXSetting retThis = null;

            using (var reader = new System.IO.StreamReader(LoadPath))
            {
                retThis = Utf8Json.JsonSerializer.Deserialize <PPTXSetting>(reader.BaseStream);
            }

            return(retThis);
        }
Beispiel #2
0
        public void SaveAs(string FilePath, PPTXSetting FileSettings)
        {
            var presentationDoc = DefaultParts.DefaultPresentationDocument.CreatePresentationDocument(FilePath, FileSettings, SlideLayouts);

            foreach (var _slide in Slides)
            {
                OpenXML.SlideWriter writer = new OpenXML.SlideWriter(_slide, SlideLayouts);
                writer.InsertNewSlide(presentationDoc);
            }

            presentationDoc?.Close();
        }