I am currently using the docx2pdf library in Python to convert Word files to PDF format. However, I have noticed that when I execute the conversion process, it forcibly closes all other Word files that I may have open for editing. Is there a way to prevent this behavior, or are there alternative libraries that I can utilize for this conversion task? I would greatly appreciate any guidance or suggestions.
from docx2pdf import convert
# Specify the input and output file paths
input_file = self.nameProject + '.docx'
current_directory = os.getcwd()
output_file = os.path.join(current_directory, self.nameProject + '.pdf')
# Convert the file and save it to the specified output path
convert(input_file, output_file)