Convert-to set page parameters

Hello!

I’using LibreOffice 7.0.2. I’m using C# code to convert some .doc/.docx to PDF. My code is running the soffice.exe process and it pass some arguments to make the convertion working.

–convert-to pdf:writer_pdf_Export --norestore --writer --headless --nologo --outdir {INPUTFILEPATH} {OUTPUTFOLDER}

Arguments between { } are managed by my code and they are dynamic.

Anyway, the command I wrote above is working fine. But, I’ve some small differences in page layout from the document opened with LibreOffice and the same document opened with Word. I’ve noticed that changing some settings in page size I obtain the same result.

Is it possibile to use these settings as arguments when I launch the soffice.exe process or there is some way to do that using default settings of LibreOffice or any other way?

Thanks

You posted convert-to question, but seems like fileopen DOC/X issue. Rarely is headless fileopen different from GUI. To know exactly one must test.
Not cleat what you would change from headless, document cannot be changed. For settings, not cleat what the problem is, you didn’t explain what settings you change in page size.