In Ubuntu terminal libreoffice --headless --convert-to pdf test.docx I convert document file to pdf file is work fine.
*My doubt is in windows system without install libreoffice to need to convert docuemnt to pdf (i.e) without install libreoffice software only libreoffice exe or bat file convert word to pdf is possible? *Or In java code to execute command prompt to using microsoft office to convert word to pdf is possible?