Answer the question
In order to leave comments, you need to log in
Is it possible to speed up the process of converting doc to pdf with LibreOffice?
Faced such a problem that the conversion of a .docx document takes a long time, are there any solutions to somehow speed up the conversion process. Other scripts, software or methods?
Here is the code to convert.
Win Apache LibreOffice
$config = array(
"lib_office_exe" => '"D:/LibreOffice 4/program/soffice.exe"'
);
function convert_to_pdf($filepath)
{
global $config;
exec($config['lib_office_exe'] . " --headless --invisible --convert-to pdf "
. $_SERVER['DOCUMENT_ROOT'] . '/' . $filepath
. " --outdir " . $_SERVER['DOCUMENT_ROOT'] . "/temp/");
header("Location: /temp/" . basename($filepath, ".docx") . ".pdf");
}
convert_to_pdf("PSF.docx");
Answer the question
In order to leave comments, you need to log in
I don't know, I always convert with TotalPDFConverter . Turns out pretty fast
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question