mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-22 23:45:02 +00:00
Fixed bug with libreoffice command line wrapper
This commit is contained in:
parent
7df48d43d6
commit
d73a61ae3d
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import { readBinaryFile, writeBinaryFile, removeDir, BaseDirectory } from '@tauri-apps/api/fs';
|
import { readBinaryFile, writeBinaryFile, removeDir, BaseDirectory } from '@tauri-apps/api/fs';
|
||||||
import { PdfFile,RepresentationType } from '@stirling-pdf/shared-operations/src/wrappers/PdfFile'
|
import { PdfFile,RepresentationType } from '@stirling-pdf/shared-operations/src/wrappers/PdfFile'
|
||||||
import { runShell } from './tauri-wrapper';
|
import { runShell, isTauriAvailable } from './tauri-wrapper';
|
||||||
|
|
||||||
export async function fileToPdf(byteArray: Uint8Array, filename: string): Promise<PdfFile> {
|
export async function fileToPdf(byteArray: Uint8Array, filename: string): Promise<PdfFile> {
|
||||||
const randUuid = crypto.randomUUID();
|
const randUuid = crypto.randomUUID();
|
||||||
@ -30,6 +30,8 @@ export async function fileToPdf(byteArray: Uint8Array, filename: string): Promis
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function isLibreOfficeInstalled() {
|
export async function isLibreOfficeInstalled() {
|
||||||
|
if (!isTauriAvailable()) return false;
|
||||||
|
|
||||||
const messageList: string[] = [];
|
const messageList: string[] = [];
|
||||||
try {
|
try {
|
||||||
await runShell("libreoffice-version", ["--version"], (message, stream) => {
|
await runShell("libreoffice-version", ["--version"], (message, stream) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user