AlJohri / docx2pdf

MIT License
513 stars 96 forks source link

Simply not working on macOS Monterey 12.6.2 #80

Open cslosiu opened 1 year ago

cslosiu commented 1 year ago

Runs, immediately exit. Command line dump:

siu@siumacbookpro16 pdfout % docx2pdf Level_1_01_tt.docx 
  0%|                                                                             | 0/1 [00:00<?, ?it/s]

siu@siumacbookpro16 pdfout % ls
Level_1_01_tt.docx

siu@siumacbookpro16 pdfout % uname -a
Darwin siumacbookpro16.local 21.6.0 Darwin Kernel Version 21.6.0: Sun Nov  6 23:31:13 PST 2022; root:xnu-8020.240.14~1/RELEASE_ARM64_T6000 arm64
s-kautz commented 1 year ago

Running into the same issue on Ventura 13.3.1 (22E261)

Is there any way to debug this?

JacobDel commented 1 year ago

Is working for me on Ventura 13.3.1 with the same command

iulica commented 8 months ago

Same here, ventura 13.6.3, Microsoft Word 16.81, python 3.11.6, mac m2 pro docx2pdf r2024.docx r2024.pdf 0%| | 0/1 [00:00<?, ?it/s]

heyupeng commented 7 months ago

Same. python 3.11.2, Mac OS 14.3. Is there any way to do ?

iulica commented 7 months ago

My solution was to install a windows 12 in a UTM virtual Machine, install Word and do the conversion there :(

iulica commented 3 months ago

I finally found what the problem was:

image

The System Events was not allowed for Terminal Automation. After activating it, doc2pdf works now.

It's found in the System Settings / Privacy & Security / Automation

benoitmiserez commented 2 months ago

Why does it need control/access to system events?

iulica commented 2 months ago

Why does it need control/access to system events?

If you have a look at the convert.jxa you'll see why. But mainly to find the process of Word (and to communicate with it) and to look for files and folders.

SystemEvents.processes["Microsoft Word"].visible = false;

const files = SystemEvents.folders .byName(args.inputPath) .diskItems.name() .sort();