View Single Post
Old 08-07-2025, 08:22 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,779
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by mfm-ca View Post
Actually, I don't believe this to be true. A standard DOCX format contains the file \word\settings.xml. The setting for not compressing images is stored there, by document.

When settings.xml is missing from the DOCX, like it is for those generated by Calibre, Word will populate a default settings.xml file within the DOCX file structure that gets written when the document is saved. It also adds an entry to \word\_rels\document.xml.rels to link to the settings.xml file. What I don't know is where Word gets the default format for settings.xml when it does not exist in a Word document that is opened and later saved.

My Normal.dotm has a settings.xml file with "<w:doNotAutoCompressPictures/>" buried in the XML. When a new Word document is created via Windows Explorer or by opening a blank document in Word, settings.xml is carried over with the above XML included.

If Calibre ever adds the settings.xml file to the output DOCX file structure, then my future edits would be isolated to the single code addition to input the above option. As it is, I think my edits are overlooking a few details when inserting settings.xml into the DOCX file structure so that I can set the above option.

Okay, I think I've beaten this into the ground enough.
Suggestion: in Preferences->Conversion->Output options->DOCX: provide additional option Inject this settings.xml file, into to which user specifies a <path to the file> they want.

I'm pretty sure I would make use of it.

I note that calibre does inject a webSettings.xml file into the DOCX files it creates.

BR
BetterRed is offline   Reply With Quote