Unlocking Larger Page Sizes in Microsoft Word
By editing width and height in the underlying xml data of a Word document we can unlock A1 & A2 page sizes. We tried A0 but Word doesn't play nice.
Sep 9, 2023 - 4 min read

Unlocking the secrets of pgSz
Maximum Page Size
As of 2023, the maximum allowable page size in Microsoft Word is 55.87cm x 55.87cm. Default page sizes up to A3 are available, suitable for most education and office tasks: assignments, letters, reports, memos, etc. Tasks involving A2, A1, and A0 are sadly out of reach (for instance, any type of large poster).
Zip files in disguise
Thanks to ThioJoe we know that Word documents are zip files in disguise.5490 Changing the extension from .docx to .zip allows us to open and view the inner file structure (mostly xml files). Interestingly, images pasted into a Word document actually live within one of the folders. Useful if you are trying to recover image files from a Word document.

Contents of a Word document in zip format
Within the document.xml file there is a piece of code <w:pgSz w:w="11906" w:h="16838"/>
. You are correct, these appear to be page sizes, values for both width and height. Documents with section breaks will have multiple pgSz entries. An orientation value will be visible if the page has been set to landscape.

Page size stored in document.xml
Twips measurements
Twip is an abbreviation for "twentieth of an inch point", a screen-independent unit commonly used for Rich Text Format (RTF) applications, such as Microsoft Office, Open Office & Libre Office.2894 One twip is defined as 1twip = 1/1440in
. Rearranging this we get 1in = 1440twips
.
You may be wondering why this is important. Looking a the initial A4 page size (rather large values) it looks like Word stores page sizes using twips values.
New page sizes
Using our new found knowledge of twips measurements we can come up with an equation to convert millimetres to twips. We know that:
- 1 inch = 25.4 mm4682
- 1 twip = 1/1440 inch2894
To summarise the conversion:
twip = (mm * 1440) / 25.4
The twips conversion can be applied to the full range of ISO page sizes. Standard ISO page sizes can be sourced from Wikipedia.7983
ISO page size7983 | Width (mm) | Height (mm) |
A4 | 210 | 297 |
---|---|---|
A3 | 297 | 420 |
A2 | 420 | 594 |
A1 | 594 | 841 |
A0 | 841 | 1189 |
Metric page sizes can be converted to imperial using 1 inch = 25.4 mm.
4682 Values are not rounded, as rounding will affect twips value accuracy.
ISO page size7983 | Width (in) | Height (in) |
A4 | 8.267716535 | 11.69291339 |
---|---|---|
A3 | 11.69291339 | 16.53543307 |
A2 | 16.53543307 | 23.38582677 |
A1 | 23.38582677 | 33.11023622 |
A0 | 33.11023622 | 46.81102362 |
Applying 1 twip = 1/1440 inch
we find:
ISO page size7983 | Width (twip) | Height (twip) |
A4 | 11906 | 16838 |
---|---|---|
A3 | 16838 | 23811 |
A2 | 23811 | 33676 |
A1 | 33676 | 47679 |
A0 | 47679 | 67408 |
The A4 twip page size matches the default values found in the xml document, confirming our hypothesis that twips values are in use.
Twips value must be rounded for use in the xml file. In some cases, the twips value must also be incremented to provide the correct page size once opened in Word (where Word converts back to mm).
Editing xml data
Using our new twips page sizes we can overwrite the width and height values in the document.xml file. After changing the values save the xml file, exit the zip, and rename back to .docx.
Opening the edited Word file will generate the custom page size (within certain limits).
Results
On the surface, the xml hack appears to work well (as of 2023). A1 & A2 documents can be created. Documents can even be exported to PDF without any difficulties. Problems do arise when using page sizes larger than A3. Modify page sizes at your own risk.
- Page rulers do not display correctly. We are unsure how many things within Microsoft Word become broken at larger page sizes.
- Page sizes above 65,536 twips (16 bit) do not work. This means that A0 is not achievable. Probably a case of integer overflow.