From bce818876c65fe5fb12b194ace32ddff3aeff611 Mon Sep 17 00:00:00 2001 From: rasamassen Date: Sat, 20 Sep 2025 19:35:30 -0500 Subject: [PATCH 1/3] Update Paper.php - Add additional paper sizes, covering the top 14 options --- src/PhpWord/Style/Paper.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/Style/Paper.php b/src/PhpWord/Style/Paper.php index c59ea42d7b..ee7fb9450b 100644 --- a/src/PhpWord/Style/Paper.php +++ b/src/PhpWord/Style/Paper.php @@ -100,13 +100,18 @@ class Paper extends AbstractStyle * @var array */ private $sizes = [ + 'Letter' => [8.5, 11, 'in'], + 'Tabloid' => [11, 17, 'in'], + 'Ledger' => [17, 11, 'in'], + 'Legal' => [8.5, 14, 'in'], + 'Statement' => [5.5, 8.5, 'in'], + 'Executive' => [7.25, 10.5, 'in'], 'A3' => [297, 420, 'mm'], 'A4' => [210, 297, 'mm'], 'A5' => [148, 210, 'mm'], + 'B4' => [250, 353, 'mm'], 'B5' => [176, 250, 'mm'], 'Folio' => [8.5, 13, 'in'], - 'Legal' => [8.5, 14, 'in'], - 'Letter' => [8.5, 11, 'in'], ]; /** From 01d5afd7f9cfb1b9d02e65648eac517733232d93 Mon Sep 17 00:00:00 2001 From: rasamassen Date: Sat, 20 Sep 2025 19:39:39 -0500 Subject: [PATCH 2/3] Update 1.5.0.md --- docs/changes/1.x/1.5.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes/1.x/1.5.0.md b/docs/changes/1.x/1.5.0.md index b96865bada..ead52a729d 100644 --- a/docs/changes/1.x/1.5.0.md +++ b/docs/changes/1.x/1.5.0.md @@ -7,6 +7,7 @@ ### Bug fixes - Set writeAttribute return type by [@radarhere](https://github.com/radarhere) fixing [#2204](https://github.com/PHPOffice/PHPWord/issues/2204) in [#2776](https://github.com/PHPOffice/PHPWord/pull/2776) +- Add additional sizes to Paper [@rasamassen](https://github.com/rasamassen), partially fixing [#1656](https://github.com/PHPOffice/PHPWord/issues/1656), in [#2829](https://github.com/PHPOffice/PHPWord/pull/2829) ### Miscellaneous @@ -16,4 +17,4 @@ ### BC Breaks -### Notes \ No newline at end of file +### Notes From a688c4ba9306aa7aaf6f4e12d1841d37ad57af70 Mon Sep 17 00:00:00 2001 From: rasamassen Date: Sat, 20 Sep 2025 19:42:05 -0500 Subject: [PATCH 3/3] Update 1.5.0.md --- docs/changes/1.x/1.5.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changes/1.x/1.5.0.md b/docs/changes/1.x/1.5.0.md index ead52a729d..a04189694c 100644 --- a/docs/changes/1.x/1.5.0.md +++ b/docs/changes/1.x/1.5.0.md @@ -7,7 +7,7 @@ ### Bug fixes - Set writeAttribute return type by [@radarhere](https://github.com/radarhere) fixing [#2204](https://github.com/PHPOffice/PHPWord/issues/2204) in [#2776](https://github.com/PHPOffice/PHPWord/pull/2776) -- Add additional sizes to Paper [@rasamassen](https://github.com/rasamassen), partially fixing [#1656](https://github.com/PHPOffice/PHPWord/issues/1656), in [#2829](https://github.com/PHPOffice/PHPWord/pull/2829) +- Add additional sizes to Paper [@rasamassen](https://github.com/rasamassen), partially fixing [#1656](https://github.com/PHPOffice/PHPWord/issues/1656), in [#2830](https://github.com/PHPOffice/PHPWord/pull/2830) ### Miscellaneous