https://github.com/hoijui/libreofficeimageoptimizer
This is an utility that reduces the file-size of images contained within a Libre-/Open-Office document, in order to cut down on the overall file-size, and to save memory and speed up working on the document.
https://github.com/hoijui/libreofficeimageoptimizer
libreoffice openoffice tool
Last synced: over 1 year ago
JSON representation
This is an utility that reduces the file-size of images contained within a Libre-/Open-Office document, in order to cut down on the overall file-size, and to save memory and speed up working on the document.
- Host: GitHub
- URL: https://github.com/hoijui/libreofficeimageoptimizer
- Owner: hoijui
- License: gpl-3.0
- Created: 2019-04-05T21:06:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-07T09:48:04.000Z (about 7 years ago)
- Last Synced: 2025-01-20T13:25:29.439Z (over 1 year ago)
- Topics: libreoffice, openoffice, tool
- Language: Kotlin
- Size: 24.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Authors: AUTHORS
Awesome Lists containing this project
README
# Libre- and Open-Office image optimizer
This is an utility that reduces the file-size of images
contained within a Libre-/Open-Office document.
This may heavily cut down on the overall file-size of the document,
and will thus __save memory__ and __speed up working on the document__,
This is most useful if one saves and/or opens the document often,
or in case of little available RAM.
## Building
```bash
mvn package
```
The resulting "binary" will be at
_target/libreofficeimageoptimizer-*-jar-with-dependencies.jar_.
## Usage
### Examples
For shortening our command lines, we will use this in all the examples (bash code):
```bash
alias docOptimizer='java \
-cp $HOME/src/LibreOfficeImageOptimizer/target/libreofficeimageoptimizer-*-jar-with-dependencies.jar \
net.hoijui.libreofficeimageoptimizer.Optimizer'
```
Example 1 - Optimization with defaults:
```console
docOptimizer document-with-huge-images.ods
```
Example 2 - Write result to a specific file:
```console
docOptimizer document-with-huge-images.ods optimized-output.ods
```
Example 3 - Specify maximum resolution in either direction (width and height);
the resizing is always preserving the aspect ratio:
```console
docOptimizer -max-size 200 document-with-huge-images.ods
```
## How it works
It simply:
1. unzips the Libre-/Open-Office document to a temporary directory
2. resizes the large images, making them smaller
3. re-zips the archive into an optimized quasi copy
of the original document