-
-
Notifications
You must be signed in to change notification settings - Fork 486
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
Unsupported type for pageMargin coordinates #2327
Comments
Hi, any update on this issue? |
I had similar issue today. Maybe this would help. Add this const doc = new Document({
sections: [
{
properties: {
page: {
margin: {
top: convertInchesToTwip(1),
bottom: convertInchesToTwip(1),
left: convertInchesToTwip(1),
right: convertInchesToTwip(1)
}
}
},
... In my case, (maybe has same origin you wrote) my old word editor doesn't support "inches" unit. Since some minor editors fail to open samples provide here, I think there should be an option to use twip for inches. (or at least default value should be twip?) 😅 |
Defaults are now Twip: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
The generated docx documents contains the following pgMar tag in document.xml
<w:pgMar w:top="1in" w:right="1in" w:bottom="1in" w:left="1in" w:header="708" w:footer="708" w:gutter="0"/>
As specified in documentation of Ecma Office Open XML. Section 17.6.11, ( you can also refer it here)
According to it the possible values for the coordinates are in twips.
The possible values for this attribute are defined by the [ST_SignedTwipsMeasure](http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/ST_SignedTwipsMeasure.html) simple [type](http://webapp.docx4java.org/OnlineDemo/ecma376/WordML/type.html) (§2.18.88).
But the generated documents contain the dimensions in inches. Please look into this issue.
The text was updated successfully, but these errors were encountered: