LibreOffice does not do a correct PDF conversion with PHP

Hello. I am trying to create a PDF from a Word file on the remote server with the exec command from PHP, everything looks something like this:

<? php
exec ('soffice --convert-to pdf --outdir C:\Sample_dir C:\Sample_dir\sample_file.docx')

Unfortunately, this works only partially - although the PDF file is created, any other font is used instead of the Univers LT Std 45 Light font, all tables are moved and blank pages are created. Oddly enough, with the Arial font, the new document looks a little better, but also not perfect. When I start the command on server from cmd

soffice --convert-to pdf --outdir C:\Sample_dir C:\Sample_dir\sample_file.docx

then the created file meets all expectations - fonts and tables are absolutely fine. I’m not sure if LibreOffice actually has anything to do with it, as a user I have the status nt-autority\system on this server, maybe the problem is there. Can anyone help me with this? Thanks.

Make sure the user that execute PHP, have the same permissions

I am this user and i see this status in PHP when i test whoami.