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

How to Add Font Styling to Paragraph Style when Creating Word Document #2754

Open
Theddie opened this issue Feb 21, 2025 · 0 comments
Open

Comments

@Theddie
Copy link

Theddie commented Feb 21, 2025

When creating word documents, PHPWord allows for defining custom paragraph styles, which in turn text content can be assigned to. The features that can be defined when creating paragraph styles seem to cover only those features that strictly relate to paragraphs -- see https://phpword.readthedocs.io/en/latest/styles.html.

When creating paragraph styles in Word, however, one can -- in addition to defining strictly-paragraph-related stuff like the paragraph's line-height -- also set properties that relate to the font styling of said paragraph. For example, one can set its (default) font-size to 16pt or its (default) font-weight to bold.

Is there a way to include such font-style-related settings in paragraph styles when creating them in PHPWord? I didn't find any information related to this question in either the docs or the web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant