In some cases, the application on non-Windows machine (e.g. Web Application) uses something (e.g. Apache OpenOffice) to convert files. But, it is difficult to parse the layout of the MS-Office document.
owa2pdf uses the Office Online that is provided by Microsoft, that working is high quality.
phantomjs owa2pdf.js -u "email@example.com" -p "password" -i /path/source.docx -o /path/dest.pdf
--ignore-ssl-errors=true option may be needed.
phantomjs --ignore-ssl-errors=true owa2pdf.js -u "firstname.lastname@example.org" -p "password" -i /path/source.docx -o /path/dest.pdf
When the PDF file which is made by Office Online is opened by Adobe Reader, "Print" dialog-box is displayed. It's done by script which was embedded by Office Online. And some other things are embedded by Office Online.
cleanpdf.pl removes some things which embedded by Office Online. This is Perl script which needs
CAM::PDF modules. (e.g.
At first, install 2 modules by your favorite installer.
cpanm PDF::API2 CAM::PDF
Then, clean files by