Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-04-2025, 09:37 PM   #1
mfm-ca
Enthusiast
mfm-ca began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Apr 2017
Device: PC
DOCX Output setting for image compression

When creating a DOCX from any other eBook format, the following setting is generated by Calibre:

File -> Options -> Advanced -> Image Size and Quality

Under this section, there is a checkbox for:

"Do not compress images in file"

This option is unchecked, meaning images are compressed. I would like Calibre to be able to generate a DOCX with this option checked. Where in the source is this setting generated in Calibre?

Note that my Normal.dotm template has this option checked, so any blank DOCX I create will have this option checked. But those DOCX coming from Calibre will not.
mfm-ca is offline   Reply With Quote
Old 08-04-2025, 10:39 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,394
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no such setting. I am guessing the setting you are referencing comes from Word and it controls how word will compress images when the doc file is saved in it. As far as I know thisis not a setting that can be controlled in the DOCX format itself.
kovidgoyal is offline   Reply With Quote
Old Yesterday, 12:38 AM   #3
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,767
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Into a blank document which has your preferred settings i.e. "Do not compress images in file" is checked, try using Word->Insert->Object>Text File on the DOCX that calibre creates.

LO Writer probably has something similar.

Not Tested

BR
BetterRed is offline   Reply With Quote
Old Yesterday, 05:35 AM   #4
mfm-ca
Enthusiast
mfm-ca began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Apr 2017
Device: PC
Quote:
Originally Posted by BetterRed View Post
Into a blank document which has your preferred settings i.e. "Do not compress images in file" is checked, try using Word->Insert->Object>Text File on the DOCX that calibre creates.

LO Writer probably has something similar.

Not Tested

BR
That method does work. In trying to automate it with my batch files and Word macros, I would need to account for the varying page sizes.

I seem to have asked this question about eight years ago. Whoops!

Anyway, for the past eight years, I have been modifying a copy of the code and linking to it. Not many changes are required. Six lines of code in one file and one line of code in another file (plus one line for __init__.py to print a message indicating I am using a code-tweaked version). This code is needed because Calibre does not include the standard settings.xml file within the created DOCX file structure.

My main issue is every time there is a new version of Calibre released, I have to download and update the code. So, while I can get Calibre updated that was installed into Windows regularly, I'm still linked to an older version of Calibre until I re-download the matching code, make the appropriate changes, and adjust the environment variable in Windows.

Not the end of the world. This would be easier if I could do this in a Word macro. Outside of a brute-force method of inserting the document into a blank document, I don't see how to do this in a macro. I toyed with the idea of modifying the XML files within the DOCX, but automating it seems to be beyond my pay grade.

Thanks for the help.
mfm-ca is offline   Reply With Quote
Old Yesterday, 07:54 AM   #5
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,767
Karma: 30237628
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Pretty sure you could do it via a Word COM add-in, I'm running a couple of such addins — EPUB Tools and Transtools.

EPUB Tools was last released in Mar 2018, not only does it work on latest Office 365… it works better than it ever did. Function-wise, all the features I use work just like they always did, performance-wise: faster, smoother, less likely to wedge… in fact it's ages since it did.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre input docx output epub image issue JeanDolphin Conversion 1 12-24-2023 09:40 PM
Cover image compression ownedbycats Calibre 7 01-23-2021 08:41 AM
2.47 - Image compression not working jlynton Calibre 0 12-25-2015 08:40 AM
MOBI Output Compression? sirbruce Calibre 6 06-14-2009 07:10 PM
MOBI Output Compression? sirbruce Calibre 4 03-27-2009 10:51 AM


All times are GMT -4. The time now is 01:47 AM.


MobileRead.com is a privately owned, operated and funded community.