I am trying to convert msg file to pdf using Convert.ToPdf(doc, filename). The .docx to pdf conversion is done properly using this function, however, I am only getting an error while converting msg to pdf. The 'print' option is also there in the context menu when I right click on the file.
This is the error I am getting:
PDFNet is running in demo mode.
Traceback (most recent call last): File "test.py", line 58, in main() File "test.py", line 44, in main Convert.ToPdf(doc, filename) Exception: An error occurred while converting the file.
Detailed error: Exception: Message: Unable to find printer Conditional expression: success Version : 8.1.0.30521 Platform : Windows Architecture : AMD64 Filename : Convert.cpp Function : trn::PDF::ToPdfPrinterManager::InitPrinter Linenumber : 776
printing to printer \trial_msg.msg AssocQueryString printto: AssocQueryString print : "C:\Program Files\Microsoft Office\Root\Office16\OUTLOOK.EXE" /p "" Created new PDFNet Mutex WaitForSingleObject start WaitForSingleObject End printo: /Local/Temp/pdftron/Trn-17236-1616513476-af5adf11-bd4d-4d40-beec-8f6aad996f18.xps Using HKCU Return value for delete registry: 0 Return value for delete registry: 0 Return value for release mutex: 0 Return value for close mutex: 0 Error destructing ToPdfPrinterManager