-3

I am trying to make an editor and need to parse slide content into an HTML canvas and I am unable to extract CSS for the same.

  • Exactly what CSS are you hoping to extract? PowerPoint files are not HTML and contain no CSS files. – Steve Rindsberg Apr 07 '21 at 15:26
  • I am making an editor, where I can upload a ppt file and edit it just like google slides/ zoho show. In order to display the content of the slide, I need to prepare an HTML canvas where I need CSS to position the items of the PPT so that it looks similar to the original slide. – Aditya Purohit Apr 08 '21 at 04:29
  • I suspect you'll have to extract and parse the XML for each slide (and master/layout) and convert the internal coordinate system to HTML/CSS yourself. – Steve Rindsberg Apr 08 '21 at 16:37

1 Answers1

0

PowerPoint files are OOXML. Styles are saved in several places. slideMaster1.xml contains titleStyle, bodyStyle and otherStyle for titles, placeholders and tables, respectively.

If layouts and/or slides have had their outline list levels modified instead of inheriting them from the slide master, then there will be lstStyle overrides in them.

Default text box styling is most often found in theme1.xml in the txDef section of objectDefaults. This section also stores the default line and default autoshape settings. More rarely, text box styling can be stored in the defaultTextStyle section of presentation.xml.

Finally, if the notes master outline levels have been modified, notesMaster1.xml will contains a notesStyle section.

Fortunately, all style sections have an identical syntax. Here's my article on otherStyle that explains some of the structure: Default Table Text

John Korchok
  • 4,723
  • 2
  • 11
  • 20