Skip to content

Is it possible to generate .pptx file that can be themed/formatted in most PowerPoint Software? #803

@foxxgreeley

Description

@foxxgreeley

I'm attempting to create a PowerPoint file that a user can download and then style (as in one-click theming/layout) in relevant PowerPoint software e.g. Google Slides, Microsoft PowerPoint, etc.

I've had success in creating/downloading the file but once it is in a relevant software the 'master slides' or theme of the slides does not affect the font color, style, or size when applied.

I've spent a few hours now searching and trying to see if I could somehow set a placeholder type and then fill it - but no dice. Is this even possible?

Here is the most simple example I could come up with that cannot be styled:

private function createSlides()
{
  // Create new PHPPresentation object
  $presentation = new PhpPresentation();
  
  // Create slide
  $slide = $presentation->createSlide();
  $slide->setName('Title of the slide');

  // Create a shape (text)
  $titleShape = $slide->createRichTextShape()
      ->setHeight(100)
      ->setWidth(600)
      ->setOffsetX(170)
      ->setOffsetY(100);
  $titleShape->getActiveParagraph()->createTextRun('This is a title.');

  return $presentation;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions