Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softyesti/libre_doc_converter
A Dart/Flutter library for converting documents using libreoffice.
https://github.com/softyesti/libre_doc_converter
Last synced: 16 days ago
JSON representation
A Dart/Flutter library for converting documents using libreoffice.
- Host: GitHub
- URL: https://github.com/softyesti/libre_doc_converter
- Owner: softyesti
- License: gpl-3.0
- Created: 2023-06-23T18:28:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-14T11:59:52.000Z (over 1 year ago)
- Last Synced: 2024-07-31T11:21:17.843Z (5 months ago)
- Language: Dart
- Size: 43.9 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# LibreDocConverter
A Dart/Flutter library for converting documents using libreoffice.
## Features
Convert from .doc, .docx, .ppt, .pptx, .xls, .xlsx to .pdf.
## Getting started
* Windows, Linux or macOS.
* LibreOffice application.## Usage
The examples are present in the `/example` folder.
### Example: Document to pdf
```dart
import 'dart:io';
import 'package:libre_doc_converter/libre_doc_converter.dart';Future main() async {
final converter = LibreDocConverter(
inputFile: File('assets/example_document.docx'),
);try {
final pdfFile = await converter.toPdf();
print(pdfFile.path);
} catch (e) {
rethrow;
}
}
```### Example: Sheet to pdf
```dart
import 'dart:io';
import 'package:libre_doc_converter/libre_doc_converter.dart';Future main() async {
final converter = LibreDocConverter(
inputFile: File('assets/example_sheet.xlsx'),
);try {
final pdfFile = await converter.toPdf();
print(pdfFile.path);
} catch (e) {
rethrow;
}
}
```