none
Does a slide reference or use a SlideMaster or SlideLayout? RRS feed

  • Question

  • Hi all;

    In the PPTX file does a slide.xml reference or in any way use the slidemaster.xml or slidelayout.xml files?

    I ask because this says when you change the master or layout you need to then apply them to any existing slides. That makes me think that the existing slides copy across what they need from the master/layout but don't point to or refer to them.

    Our app reads the PPTX to then render it as PDF. If there is no use of the master/layout in the slide, then we can ignore those when we read in the slides.

    ??? - thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Monday, August 3, 2020 7:45 PM

Answers

  • Hi David,

    I believe you're correct in your assumptions about walking the relationships. I use System.IO.Packaging (not the SDK) and built this all a long time ago - hard to remember exactly.

    There used to be much more direct documentation on this back in the day - with all the sites now defunct (ericwhite/blog, openxmldeveloper.org), this stuff is hard to come by - had to pull it out of an archived folder, but I found it - "OpenXML Explained". 

    In this eBook, circa 2007, the author lists out the content and relationship types for each of these slide assets. See pages 91-93 in the eBook. I found a copy of of still hosted online at http://www.brandwares.com/bestpractices/2020/01/ooxml-hacking-open-xml-explained/ and the direct link to the ebook is http://www.brandwares.com/downloads/Open-XML-Explained.pdf.

    Todd


    • Marked as answer by DavidThi808 Saturday, August 8, 2020 9:05 PM
    Saturday, August 8, 2020 7:09 PM

All replies

  • Hi David,

    Thank you for your question.  An engineer will contact you soon.


    Bryan S. Burgin Senior Escalation Engineer Microsoft Protocol Open Specifications Team

    Monday, August 3, 2020 8:35 PM
    Moderator
  • Hi David,

    A slideX.xml will always reference a slideLayoutX.xml (which will always reference a sliderMasterX.xml, which will always reference a themeX.xml).

    You'll need the slideLayoutX.xml for your PDF renderer - think if it as something that offers some logic to the slideX.xml in some cases. It is also the bottom of the Z layer of the display slide. And it can have it's own animation that gets implemented before the slideX.xml's animation.

    In a renderer, you're just flattening all the layers, so the final slide you render will be a composite of all the needed items in slideX.xml, slideLayoutX.xml, sliderMasterX.xml, and themeX.xml (and all of their dependencies, like fonts and media).

    PresentationML is definitely a different beast compared to DML and SML.

    Todd

    Monday, August 3, 2020 8:46 PM
  • Hi;

    I asked this here too.

    How is that mapped. The file slide1.xml.rels has an rId1 reference. But rId1 is not set anywhere in slide1.xml.

    Is the way this is done that for slide#.xml go to slide#.xml.rels and in there find Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" and from that use the Target?

    And does that mean there will always be exactly one Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" in the slide#.xml.rels file?

    And then same question for layout to master, is it open the slidelayout#.xml.rels and there is exactly one relationship with Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster" and that gives me the related master?

    This all strikes me as sort of like formatting properties in DOCX where they can be set inline or in various styles.

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Saturday, August 8, 2020 4:38 PM
  • Hi David,

    I believe you're correct in your assumptions about walking the relationships. I use System.IO.Packaging (not the SDK) and built this all a long time ago - hard to remember exactly.

    There used to be much more direct documentation on this back in the day - with all the sites now defunct (ericwhite/blog, openxmldeveloper.org), this stuff is hard to come by - had to pull it out of an archived folder, but I found it - "OpenXML Explained". 

    In this eBook, circa 2007, the author lists out the content and relationship types for each of these slide assets. See pages 91-93 in the eBook. I found a copy of of still hosted online at http://www.brandwares.com/bestpractices/2020/01/ooxml-hacking-open-xml-explained/ and the direct link to the ebook is http://www.brandwares.com/downloads/Open-XML-Explained.pdf.

    Todd


    • Marked as answer by DavidThi808 Saturday, August 8, 2020 9:05 PM
    Saturday, August 8, 2020 7:09 PM
  • Thank you!!!!!!!!!!!!!!!!!!!!!!!!!

    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Saturday, August 8, 2020 9:05 PM