In python-docx/docx/templates/default.docx, when it is unzipped, line 2 of the file word/settings.xml is
<w:zoom w:val="bestFit" w:percent="203"/>
This means the default template opens in MS Word at 203% zoom, which is obnoxious for testing documents created with python-docx.
While I have changed my own template to read w:percent="100", maintainers might consider setting this to a more reasonable value.
I can verify this issue. Worse, is the hard-coding seems to override word processor defaults, unless it's saved with a new zoom. 100% seems to be a sane default, but might be even nicer if this wasn't hard-coded at all and just left with "bestFit" or template default.
Leaving only "bestFit" is quite a nice change to going from a readable document to being zoomed way in when I need to reload a document.
I confirm that just removing the w:percent attribute opens it in the default zoom - a much more convenient outcome!
Ok guys, good to know. Especially since w:percent isn't implemented yet :)
Can you give me an idea what the end-user experience is and on what kind of machine?
My development platform is relative huge, screen-wise (27" 2560x1440), so that probably accounts for the large size.
I'd be a little disinclined to change something that's already worked it's way into running systems, but if it sucks for everybody (except me :) then it might be a welcome change.
I was using it on my fedora laptop screen which is 15.6" 1920x1080 as well as my 24"s at 1920x1080, I run things windowed, not full screen, so I can reference multiple things at once.
Similar specs to the above. The hard-coding means, I have to zoom out a document to see it all, regardless of window size. It's a minor inconvenience for the first time opening a document and a much larger one for continually testing them from programmatically generated - especially since hard-coding the percent overrides the program defaults.
As an alternative, you could add percent as an optional document attribute, though simply omitting it should simply default to the user's word processor settings.
Would also really appreciate this fix
As a hack on OS X, you can post-adjust the zoom via external AppleScript.
Fixed in release v0.8.7 circa Aug 18 2018.
A very welcome fix. It's working fine for me.
Great, thanks for letting me know @martinjevans :)
Most helpful comment
I confirm that just removing the w:percent attribute opens it in the default zoom - a much more convenient outcome!