0

How to make an underline in PHPPresentation. I just wanted to make an underline for some of my text.

Can any of you let me know on this

John
  • 565
  • 8
  • 23
  • If it's HTML, just use a CSS rule like `text-decoration: underline red;` – delboy1978uk Aug 24 '18 at 12:09
  • 1
    Was wondering about that too, but it clearly isn't: https://github.com/PHPOffice/PHPPresentation#getting-started . Maybe ask the question over at the github repository? This seems to be a quite specific library question, and you'll probably get better help over at the repo. – Loek Aug 24 '18 at 12:10
  • Questions that ask "where do I start?" are typically too broad and are not a good fit for this site. People have their own method for approaching the problem and because of this there cannot be a _correct_ answer. Give a good read over [Where to Start](https://softwareengineering.meta.stackexchange.com/questions/6366/where-to-start/6367#6367) and [edit] your post. – Machavity Aug 24 '18 at 12:10

1 Answers1

3

Nevermind my earlier comment, it can be done according to the docs.

$element->getFont()->setUnderline(Font::DASHED); // Pick a style

Styles and API are here: https://phpoffice.github.io/PHPPresentation/docs/master/classes/PhpOffice.PhpPresentation.Style.Font.html#method_setUnderline

Loek
  • 4,037
  • 19
  • 35