Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
foxxgreeley opened this issue May 28, 2024 · 0 comments

Comments

@foxxgreeley
Copy link

foxxgreeley commented May 28, 2024

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;
}
@Progi1984 Progi1984 added this to the 1.1.0 milestone Aug 21, 2024
@Progi1984 Progi1984 modified the milestones: 1.1.0, 1.2.0 Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants