Office Importer Application image issue

Hi guys,

I was use “Office Importer Application” + “OpenOffice” in order to upload MS word, but I have one issue about images, it seem those resolution of images were too lower after uploaded, is it have a way to setting the compression rate of images?

Hi @Jacky

there’s currently no way to specify the compression rate for images when uploading an office document containing images. However in theory I think it should take the image contained in the file, so it should depend on the actual resolution of the integrated image.

Can you share an example of an office document where the image is imported with bad compression? Could be interesting to see if we reproduce, it might also be related to the version of OpenOffice or LibreOffice which is installed.

Hi @surli,

Thank you for your quick answer, here is my image screenshot

Re image size and other image param this reminded me of for the office macro. I don’t know if it’s limited to the office macro or if it’s also usable for the office importer (but since I think the office macro share code with the office importer, it’s possible).

@vmassol that configuration is only for presentations, where the slides are converted to images. But here @Jacky mentioned “MS word” so not a presentation. To my knowledge the behavior should be the one described by @surli : the image from the word file is attached as is.

@Jacky we would need the word file to be able to reproduce the problem. Also, you didn’t mention the version of XWiki and OpenOffice that you’re using.

@mflorea My XWiki is running under 12.1 and OpenOffice is 4.
After I try to make the image more bigger than before (one image one page…:frowning: ), then the resolution seem better now.
But I still want to know the reason, maybe same as @surli said it is depend on the actual resolution of the integrated image.
Here I haven’t found out where I can upload MS word file in this page.

So there could be at least 3 different reasons for the resolution change:

  1. for importing the file OpenOffice (or LibreOffice) is transforming the file to HTML
  2. to drive this transformation we use an intermediary called JodConverter ( which applies some filters notably on images
  3. XWiki itself when it imports the HTML document could perform transformation on images

Here I don’t think XWiki would do anything on the picture, so I don’t think it’s related to it.
Now you’re using OpenOffice, so maybe it’s related to it: you could perform a try with LibreOffice to see if the result is the same.

@surli I tried LibreOffice, there have same result as OpenOffice.
Now I try use another way to upload it that is create a blank page then inster XWiki Macro “Office Document Viewer” instead of create from “Page from office” template, seem the resolution is good now.

That’s interesting, it suggests that it’s actually really a bug on our side.
Could you open an issue on with the original problem and indicate your workaround please?

Thank you for your advice.
I have another issue now, if I using Macro upload the MS word, I cannot edit via XWiki editor.
In the source interface, it just have “{{office reference=“FILE_NAME.docx”/}}” inside.