A Dart/Flutter library for converting documents using libreoffice.
Convert from .doc, .docx, .ppt, .pptx, .xls, .xlsx to .pdf.
- Windows, Linux or macOS.
- LibreOffice application.
The examples are present in the /example
folder.
import 'dart:io';
import 'package:libre_doc_converter/libre_doc_converter.dart';
Future<void> main() async {
final converter = LibreDocConverter(
inputFile: File('assets/example_document.docx'),
);
try {
final pdfFile = await converter.toPdf();
print(pdfFile.path);
} catch (e) {
rethrow;
}
}
import 'dart:io';
import 'package:libre_doc_converter/libre_doc_converter.dart';
Future<void> main() async {
final converter = LibreDocConverter(
inputFile: File('assets/example_sheet.xlsx'),
);
try {
final pdfFile = await converter.toPdf();
print(pdfFile.path);
} catch (e) {
rethrow;
}
}