0

Sorry if this is not the right forum in the frame. I reused a MS Word template to create a document with LibreOffice. The final output was a huge file, as lots of MS Windows fonts were integrated into the odt document. I unzipped to odt document, deleted the unused fonts. Now how can I compress the folder again to get my odt file back ?

2

Now how can I compress the folder again to get my odt file back ?

Zip it. When you enter the unzipped directory you can do

zip -r ../{filename}.odt 

where {filename} is the name you want it to be and it will recreate your .odt; hopefully with a smaller size.


Extra comment:

The "mimetype" file should be 1st in the archive (though OO does not care about it other software might). You can force that by doing

zip -r ../{filename}.odt mimetype .
  • Thanks. Here is what I typed and the error message I got: root@m193530:/home/kalzi01/Documents/Projets/Sondage2017/PortraitLL_AdminPublique-V0.7.odt_FILES# zip -r ../Portraitv07Compresse.odt zip error: Nothing to do! (../Portraitv07Compresse.odt) – Ziz Mar 20 '17 at 16:06
  • Is there anything in the directory? – Rinzwind Mar 20 '17 at 17:54
  • 1
    Yes, all the unzipped folders and files, which is the result of the extraction of any odf file. Actually, it turned to be a LibreOffice matter. Here is what I did (I ended up finding the solution"): In LibreOffice Writer, I opened the file, went to file, properties, clicked on fonts tab and unchecked the box about fonts embedding. The size went from 9.3 MB down to 243K! Thanks for your help! – Ziz Mar 21 '17 at 13:07
  • Oh big reduction :D Good you got it fixed. – Rinzwind Mar 21 '17 at 13:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.