Skip to content

Commit

Permalink
fix: use uconv
Browse files Browse the repository at this point in the history
soffice issues on linux.
  • Loading branch information
aalemayhu committed Dec 12, 2024
1 parent 5336ee2 commit 23f5fd6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/pdf/ConvertPPTToPDF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export function convertPPTToPDF(
workspace: Workspace
): Promise<Buffer> {
return new Promise((resolve, reject) => {
const sofficeBin =
const unoconvBin =
process.platform === 'darwin'
? '/Applications/LibreOffice.app/Contents/MacOS/soffice'
: '/usr/bin/soffice';
? '/usr/local/bin/unoconv'
: '/usr/bin/unoconv';

const normalizedName = path.basename(name);
const tempFile = path.join(workspace.location, normalizedName);
Expand All @@ -26,8 +26,8 @@ export function convertPPTToPDF(
);

execFile(
sofficeBin,
['--headless', '--convert-to', 'pdf', tempFile],
unoconvBin,
['-f', 'pdf', tempFile],
{
cwd: workspace.location,
},
Expand Down

0 comments on commit 23f5fd6

Please sign in to comment.