06-08-2023, 11:04 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: May 2012
Device: Mac, iPad, Kindle
|
Prevent image conversion
Hello
As part of our workflow we convert our EPUB files to Word docx to send to our reviewers for updating. We have been using Calibre to do this. However, we changed our image format to SVG last year and now the text in the images appears in single lines rather than in text boxes, when converting to DOCX. It looks like Calibre converts the SVG images to PNG during the conversion process. Is there a way to prevent Calibre from converting images? I have attached the EPUB file, the converted DOCX file, a screen shot showing the problem image in Word and a copy of the original SVG file. Here is the conversion log: Spoiler:
I did not change any of the conversion options.
Many thanks Last edited by theducks; 06-08-2023 at 12:38 PM. Reason: spoilered log |
06-08-2023, 12:10 PM | #2 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Does Word even support SVG? At the time I wrote the DOCX output plugin it definitely didnt.
|
Advert | |
|
06-08-2023, 01:18 PM | #3 |
Junior Member
Posts: 7
Karma: 10
Join Date: May 2012
Device: Mac, iPad, Kindle
|
I was able to import that SVG into a blank DOCX file. As you said, it probably didn't when you DOCX output plugin.
|
06-08-2023, 02:43 PM | #4 |
the rook, bossing Never.
Posts: 12,384
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
LO Writer supports SVG, don't know since when or what input formats.
MS Word (don't know since which version & not tried my 2007) can't insert an SVG file, but at least on Word 2019, according to various sources inc MS, you can copy/paste SVG from Inkscape via clipboard. This suggests copy/paste SVG into Word 2007 works, because there is a quality setting. https://superuser.com/questions/1555...es-its-quality But as to what is done when you save / load a docx is another story. I'm not inclined to research it as I run Linux & LO, though I have some Windows boxes and XP, Win7 & Win10 on VMs and Word 2003 on WINE. Not sure which install has the MS Word 2007. https://learn.microsoft.com/en-us/of...e-quality-loss Edit: Perhaps even when you copy/paste, saving the docx rasterises it, otherwise why would there be a quality setting? Last edited by Quoth; 06-08-2023 at 02:52 PM. |
06-08-2023, 07:27 PM | #5 |
null operator (he/him)
Posts: 21,008
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
Advert | |
|
06-08-2023, 10:28 PM | #6 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Can someone attach a docx file with an embedded svg, I only have Word 2008 (last I can get working with WINE).
|
06-08-2023, 11:51 PM | #7 |
null operator (he/him)
Posts: 21,008
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Here you go.
BR |
06-09-2023, 06:21 AM | #8 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Well I added support it was fairly trivial to do, but I have no way to test it. Attached here is a docx to docx conversion of BetterRed's test file using the new code. Try it in word and see.
|
06-09-2023, 07:03 AM | #9 |
the rook, bossing Never.
Posts: 12,384
Karma: 92073397
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Both open in LO Writer 7.4x, though I can't tell if raster or vector. The t.docx properties have image.png as name and doc1.docx is empty.
my Word 2003 on WINE has no docx plugin. MS removed that patch/update from their site years ago (released some time in 2008?) I thought my 2002/XP had a docx plugin, but not on the VM. Must be on a box somewhere. XP no longer connects to my server, so I'll have to put test files on a USB stick. The Win10 VM has no MS Office (possibly, but Start & Search is so "broken" on Win10, who knows?) and the Win7 VM has WordXP/2002, so the Word 2007 must be on a box somewhere. Last edited by Quoth; 06-09-2023 at 07:24 AM. |
06-09-2023, 07:17 AM | #10 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
LO doesnt support svg as far as i know. So it will use the raster rendering. IIRC the raster rendering has the far tusk not rendered well.
|
06-09-2023, 07:17 AM | #11 |
Resident Curmudgeon
Posts: 76,510
Karma: 136565392
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Word is coming up saying I can only view it. The permissions need to be fixed.
|
06-09-2023, 07:24 AM | #12 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can also try resizing the image it will not show jaggies if its svg when expanded.
|
06-09-2023, 07:28 AM | #13 |
creator of calibre
Posts: 44,566
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
06-09-2023, 08:18 AM | #14 | |
Junior Member
Posts: 7
Karma: 10
Join Date: May 2012
Device: Mac, iPad, Kindle
|
Quote:
Does version 6.20 have the support for SVG added? |
|
06-09-2023, 08:21 AM | #15 | |
null operator (he/him)
Posts: 21,008
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Jon, Word is rightfully blocking the t.docx from edit because it came from the 'Net. You can click the Allow Edit button in Word or check the Unblock checkbox in the file's property box. Standard Windows behaviour. BR |
|
Tags |
calibre, conversion, docx, epub, svg |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Flagging books to prevent conversion? | jeffery | Conversion | 2 | 07-08-2018 03:25 AM |
EPUB -> PDF: prevent image splitting? | badbob001 | Conversion | 1 | 02-25-2015 11:08 PM |
Prevent PDF Conversion | trubbba | Conversion | 3 | 08-17-2012 01:53 AM |
Is there a way to prevent Calibre adding to the TOC upon conversion? | PatNY | Conversion | 21 | 03-17-2011 04:09 PM |
Conversion to Mobi - How to Prevent Formatting marks in Comments | nynaevelan | Calibre | 8 | 01-03-2011 03:10 PM |