Make page number work with Office 365

This commit is contained in:
Veronica Berglyd Olsen
2024-11-13 20:50:47 +01:00
parent ed431aa30f
commit 57641ecd7d
2 changed files with 2 additions and 7 deletions
+1 -3
View File
@@ -855,12 +855,10 @@ class ToDocX(Tokenizer):
xR = xmlSubElem(xP, _wTag("r"))
xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "begin"})
xR = xmlSubElem(xP, _wTag("r"))
_wText(xR, " PAGE ")
xmlSubElem(xR, _wTag("instrText"), "PAGE", attrib={_mkTag("xml", "space"): "preserve"})
xR = xmlSubElem(xP, _wTag("r"))
xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "separate"})
xR = xmlSubElem(xP, _wTag("r"))
_wText(xR, "0")
xR = xmlSubElem(xP, _wTag("r"))
xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "end"})
if post:
xR = xmlSubElem(xP, _wTag("r"))
@@ -13,14 +13,11 @@
<w:fldChar w:fldCharType="begin" />
</w:r>
<w:r>
<w:t xml:space="preserve"> PAGE </w:t>
<w:instrText xml:space="preserve">PAGE</w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate" />
</w:r>
<w:r>
<w:t>0</w:t>
</w:r>
<w:r>
<w:fldChar w:fldCharType="end" />
</w:r>