Comments (3)
I had similar issue today. Maybe this would help.
Add this properties
in the section
.
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?)
😅
from docx.
Hi, any update on this issue?
from docx.
Defaults are now Twip:
from docx.
Related Issues (20)
- tableHeader repeats row only if declared on the first row in a table
- el.elements not iterable when patching comments
- can not set indent by chars HOT 2
- Adding different numbering within the same line of paragraph HOT 12
- Field Codes in SimpleField Formulas HOT 1
- Corrupt Word document from patching with an XML attribute with an ampersand HOT 3
- After Patching, Following Text is Wrong Font Family HOT 1
- Possibility of adding hanging without affecting left indent of the paragraph.
- `PageNumber.TOTAL_PAGES_IN_SECTION` not documented and not functional, but within TS enum HOT 2
- Colors are not showing properly HOT 2
- When I open a document using WPS office, the width of the table cannot fill the entire page HOT 3
- Add accent characters
- The MathIntergral limLoc seems to be wrong
- Doesn't work with bg-black HOT 1
- Couple issues with embedded fonts HOT 4
- how to set field language 'TH' in TextRun HOT 1
- Error "Can't read the data of 'the loaded zip file'" from docx patcher HOT 7
- ImageRun not working with data of ArrayBuffer type HOT 6
- Can not find `patchDocument` in browser
- iterate paragraphs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docx.