Created attachment 125397 [details] Minimal document with an image that fails to export as expected Latest Version tested with this issue: 5.1.2.2 The image in the source docx is clear and legible, the image in the html or pdf export is very degraded. Oddly, exporting to rtf doesn't seem to suffer from this bug.
On windows 10 Pro 64-bit en-US with Version: 5.1.3.2 (x64) Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b CPU Threads: 8; OS Version: Windows 6.19; UI Render: default; Locale: en-US (en_US) Can not confirm. Of three embedded images, one is PNG and the others are WMF. The main composition is a WMF at 345 x 221 px in 24-bit color. It renders correctly when exported to PDF (lossless compression) with no sign of resampling or pixelation.
Created attachment 125400 [details] png as exported with --format=html ; blurry text
# unoconv --format=html Thermo\ Test.docx generates an html file with the image encoded in base64 (as expected) but the text is blurry (compressed). Take a look at the 31.8 °C. It is blurry and looks almost out of phase. # unoconv --format=rtf Thermo\ Test.docx Open the generated RTF file. Take a look at the 31.8 °C. It is clear, as expected.
I tested PDF export as you stated by doing: # unoconv --format=pdf -eUseLosslessCompression=true Test.docx and it appears to function as you mentioned in Comment 1. Please adjust my bug report to be export to HTML *only*. Thanks for that!
I believe the issue is that the dpi of the raster image (PNG) is low. When the vector data (text) is placed into the low dpi image it is thus lacking the pixels to be clear. To get around this, one can open the .docx as .zip, copy out the .wmf files. # unoconv --format=pdf imageN.wmf # unoconv --format=svg imageN.pdf Oddly, one tries to export from .wmf to .svg directly there are some alignment issues. You may wish to open a new bug report up for this (if it doesn't already exist).
I did see the mis-alignment of wmf -> svg text when converted headless with a LibreOffice "convert-to svg". But going to close this NAB... For doing these graphic format conversions the ImageMagick Convert utility, with a Ghostscript present, provides very clean format conversions--in fact internally LibreOffice makes use of these helper programs. So for example: "C:\Program Files\ImageMagick-7.0.1-Q16\convert.exe" image1.wmf image1.svg Other wise not sure there is any issue here. Taking a 345 x 221 px Windows Meta File--a vector format (the image is raster, but text is not)--and converting to raster format PNG, there will be loss of fidelity between the vector font of the WMF and the rasterized font of the resulting PNG used in the HTML conversion. RTF of course is a vector format. =-note-= And for Windows users, rather than unoconv --format=FTYPE <sourceFile>, the CLI is: soffice.exe --headless --convert-to FTYPE <sourceFile> [<outputFile>]
On Ubuntu 16.04 the conversion fails as follows: # convert image4.wmf image4.svg ERROR: player/record.h (28): Bad record - unexpectedly short! ERROR: player/record.h (28): Bad record - unexpectedly short! ERROR: player/record.h (28): Bad record - unexpectedly short! ERROR: player/record.h (28): Bad record - unexpectedly short! ERROR: player/record.h (101): Bad record - unexpectedly short! convert: failed to scan file `image4.wmf' @ error/wmf.c/ReadWMFImage/2706. convert: no images defined `image4.svg' @ error/convert.c/ConvertImageCommand/3210. # convert --version Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-04-18 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib -=note=- The convert package isn't at version 7 as it was in your testing. The work around is as mentioned in Comment 5