wordpress hit counter
Re: Set custom slide size - PresentationML - Formats - OpenXML Developer

Re: Set custom slide size

Formats

Discussions about working with different Open XML Formats

Set custom slide size

  • This post has 2 Replies |
  • 2 Followers
  • Hi,

    I want to modify the size of the individual slides in a PowerPoint presentation.

    I've been using presPart.Presentation.SlideSize.Cx = .

    What kind of units is this number in? My question then is, if I know in pixels or inches how large I want the slide to be, how do I convert this to whatever number is actually being stored in the xml?

    Thanks,

    Nathanael
  • Hi,

    Units of the size in open XML is EMU (English Metric Units). And you can convert those to pixels with following formulas.

    pixel=EMU * Resolution/914400;

    where "Resolution" is resolution of your screen. e.g. 96 dpi etc.

    For more details go through below link.

    http://polymathprogrammer.com/2009/10/22/english-metric-units-and-open-xml/

  • In general, use these formulas:

    1. EMU / 12700 = pixels
    2. pixels * 12700 = EMU
    3. inches * 914400 = EMU
    4. EMU / 914400 = inches

    These formulas work well with the default numbers used in the PowerPoint client - especially images which are usually sized for 72 dpi, regardless of their internal dpi or the dpi of your screen. In other words, the way a PowerPoint creates a slide is for printing first, secondarily for on-monitor-display so print ppi/dpi does actually matter.

    So in the case of your question above, if you want your slide to be 10" wide (SlideSize.Cx), you would set it to 9144000 (=10 * 914400) using #3 above.

Page 1 of 1 (3 items)