Converting DOCX to PDF

Hello, guys.

Is there any library that allows conversion .docx to pdf formats?
The ones I found have capabilities to convert different formats to txt, or from HTML to PDF, but not from .docx to pdf.

Could you help me with that?

These packages say they support docx to pdf:

Thank you, I’ll check them out.

Those links that you provided didn’t work for me. They either uses cloud uploading or libreOffice, those options are no use for me cause I am using sensitive data in those files.

Do you know if there is any other way of doing it?