docx2pdf icon indicating copy to clipboard operation
docx2pdf copied to clipboard

Simply not working on macOS Monterey 12.6.2

Open cslosiu opened this issue 2 years ago • 8 comments

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

cslosiu avatar Mar 25 '23 13:03 cslosiu

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

Is there any way to debug this?

s-kautz avatar Apr 29 '23 13:04 s-kautz

Is working for me on Ventura 13.3.1 with the same command

JacobDel avatar May 26 '23 13:05 JacobDel

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]

iulica avatar Jan 28 '24 09:01 iulica

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

heyupeng avatar Mar 10 '24 13:03 heyupeng

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

iulica avatar Mar 10 '24 16:03 iulica

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

iulica avatar Jun 14 '24 11:06 iulica

Why does it need control/access to system events?

benoitmiserez avatar Jul 11 '24 09:07 benoitmiserez

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();

iulica avatar Jul 11 '24 10:07 iulica