libreofficeKit-rs

Rust bindings to LibreOfficeKit

Installation

toml [dependencies] libreoffice-rs = 0.3.1

you need install LibreOffice ( >= 6.0 is recommended ), Debian 11 for example: ```bash $ sudo apt-get install libreoffice-core libreofficekit-dev libclang-dev

set env variable LO_INCLUDE_PATH to the LibreOffice headers.

$ export LOINCLUDEPATH=/usr/include/LibreOfficeKit ```

due to this issue , here use a libwrapper.a to carry static funtion lok_init which defined in LibreOfficeKitInit.h.

Example

```rust use libreoffice_rs::{Office, LibreOfficeKitOptionalFeatures, urls};

fn main() -> Result<(), Box> { // your libreoffice installation path let mut office = Office::new("/usr/lib/libreoffice/program")?; let docurl = urls::localintoabs("./testdata/test.odt")?; let mut doc = office.documentload(docurl)?; doc.save_as("/tmp/test.pdf", "pdf", None); } ```

License

This project is licensed under the [Apache License 2.0][license]