Skip to content

Unable to add new paper size outside library #1656

@mauricekindermann

Description

@mauricekindermann

I use PHPWord extensively, but I can't figure out how to set up a "Tabloid" paper size outside the library. Hacking the library file is easy enough, you just add this:

'Tabloid' => array(11, 17, 'in'),

To line 109 on this page:

https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Style/Paper.php

But I need to initiate Tabloid outside the library as it's too easy to overwrite when updating, moving or deploying code.

It's strange that PHPWord helpfully lists every paper size in the file above, but then only initiates 6 defaults. The docs are also very helpful, except "Paper" doesn't even register in the search?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions