Reputation:
i want to convert doc,docx file into pdf using libreofficec .i had found many question related to this but one of these not helpful to me so i post my qwestion over here here is my code
$resume = Input::file('resume');
$extenstion = 'pdf';
$datafiles = 'Resume_'.str_random(10).'.'.$extenstion;
$resume ->move(public_path('datafiles/APPL'), $datafiles);
how i can mere above code in this for ex i want to convert a file into pdf and then assign a $datafile after that i want to move this file to this location datafiles/APPL or is there any way to assign $datafile directly to below code or eg
shell_exec('start /wait soffice --headless --convert-to pdf --outdir --savefile name as $datafiles "./publicapp" "'.$resume.'"'); // is this possible or other correct way
shell_exec('start /wait soffice --headless --convert-to pdf --outdir "./publicapp" "'.$resume.'"');
Upvotes: 1
Views: 760
Reputation:
simplest wy is to use "unoconv":
sudo apt-get install unoconv
doc2pdf respondus-docx-sample-file.docx
Upvotes: 2