How to convert word to pdf(without word application installed)

Hello all,

I am extracting word document from input email and want to convert to pdf.
How can I do this without word application installed in machine.

Thanks in Advance for any suggestions

Hi @Hemasai

Please give a try on the following

If you are using Microsoft 365, use Microsoft Graph API to convert the file directly to PDF, which is more scalable and doesn’t require any local installation.

Steps

  • Upload your .docx file to OneDrive
  • Call Graph API: GET /me/drive/items/{item-id}/content?format=pdf

Regards,
Christopher

@Hemasai

Follow the below steps to convert the word document to pdf without word application,

Happy Automation

Hi @Hemasai

As per my knowledge you can do with 3 way-

MS Word installed use Word activities
LibreOffice installed - use Start Process
Cloud (Office 365 / API) - use HTTP or M365 activities

Happy Automation

@Hemasai

Not a very straight way but this thread has all the details..you might need to find those dlls or nupkg

cheers

LibreOffice headless is probably your best shot here. LibreOffice headless is probably your best shot here. Run soffice --headless --convert-to pdf yourfile.docx from command line and it converts without needing Word installed at all.

If you’re scripting this, Aspose.Words works standalone too but it’s paid. LibreOffice is free and handles batch jobs fine if you’re doing this regularly off incoming emails.