View Single Post
Old 08-08-2025, 02:00 AM   #9
mfm-ca
Enthusiast
mfm-ca began at the beginning.
 
Posts: 33
Karma: 10
Join Date: Apr 2017
Device: PC
Quote:
Originally Posted by BetterRed View Post
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
That would be pretty nice, but I think Kovid is right. That would require a fair amount of work to address a very small demand.

I have two options:

(1) Keep modifying the Calibre code to insert the settings.xml code along with the code for compressing images option. It is an annoyance, but it works. My only concern is I am not sure I am addressing all of the code that needs to be touched. I've read about "serializing" the XML files, whatever that means. I am currently not doing that with settings.xml, but the DOCX files have been loading into Word without errors and my option has been set. I know enough to be dangerous, but nowhere near enough to be an expert.

(2) Within a batch file: (a) let the unmodified Calibre software generate the DOCX; (b) open the DOCX in Word and force a SaveAs which would get the document updated to my version of Word plus insert a default settings.xml file; (c) use a tool like 7-Zip to overwrite the settings.xml file in the DOCX with one that has the compressing images option; (d) execute my normal Word macros to run a first-pass to clean up the DOCX formatting and insert my preferred style set and good quality cover image.
mfm-ca is offline   Reply With Quote