cognidox / OfficeToPDF

A command line tool to convert Microsoft Office documents to PDFs
https://www.cognidox.com/
Other
609 stars 137 forks source link

Printing to Amyuni PDF Converter #78

Closed hrst closed 1 year ago

hrst commented 2 years ago

I'm trying to print to "Amyuni PDF Converter version 6.0.3.7". This is the command and output:

C:\Users\Administrator>C:\TEST\Tools\OfficeToPDF\OfficeToPDF.exe /verbose /printer "Amyuni PDF Converter" C:\TEST\Temp\test.docx
Converting C:\TEST\Temp\test.docx to C:\TEST\Temp\test.pdf
Converting with Word converter
The directory is not empty.

Did not convert

The PDF printer works flawless when printing manually from Word. There are no popups or such. The error message "The directory is not empty." apparently is connected with "rmdir" but it is hard to find out what is happening.

Any help would be highly appreciated!

vittala commented 2 years ago

Hi

The purpose of the /printer option is to select a printer that will generate postscript output that officetopdf.exe will then convert to a PDF. If the Amyuni printer is generating a PDF, then I suspect that's the problem.

If you just want to use the "Amyuni PDF Converter" printer to convert the file (and it's the default printer), you could try running Word directly to print:

    winword.exe C:\TEST\Temp\test.docx /mFilePrintDefault /mFileCloseOrExit /q /n

Vittal