I'm using LibreOffice 220.127.116.11 a64200df03143b798afd1ec74a12ab50359878ed on Win10.
The --cat option of soffice.exe doesn't output the text contents of the files included on the command line as described.
> --cat Dump text content of the following files to console
For example command below doesn't output the text of any of ODT files I've tried the command with to the console as expected.
"%ProgramFiles%\LibreOffice\program\soffice.exe" --cat "any-odt-file.odt"
What happens if you use soffice.com instead of soffice.exe ?
I get the exact same behavior with soffice.com
Could you please attach a sample ODT file you tried with, and also a screenshot of the command and (missing) result? Thanks.
Created attachment 156902 [details]
SS of command output.
Attached is the SS of command output.
Created attachment 156903 [details]
Sample ODT file that doesn't --cat output
Attached are the requested SS of the command output and the sample ODT file used.
(In reply to Brad from comment #6)
1. As mentioned in comment 1, the command like should start with
> "C:\Program Files\LibreOffice\program\soffice.com"
> "C:\Program Files\LibreOffice\program\soffice"
That is because .com is console-mode application; .exe is GUI application.
2. When you have another LibreOffice instance running, all following LibreOffice instances don't do anything themselves, but just pass their command to the first running instance. That means, in thi case, that the other program will receive the --cat command - and try to output the result to (absent) console; while this console will not receive anything.
Possibly there should be passing of the --cat and the like back to the caller ... Anyway, please test without other LibreOffice instances running (including quickstart if enabled).
Using the com command ("C:\Program Files\LibreOffice\program\soffice.com" --cat test-cat.odt) without any LibreOffice instances running does produce the output expected. However there is no output when there is any instance running due to the reasons you mention in part 2.
Is there anyway to use this command with an instance running without a bit of programming? I would argue that it's a big limitation and makes the commands usefulness questionable.
I would like to use the command for git revisions so it would be necessary for the command to still work on open documents.
Thanks for your time!
(In reply to Brad from comment #8)
> Is there anyway to use this command with an instance running without a bit
> of programming?
Yes: you may use a different (e.g., temporary) user profile  for the task, and that would create a separate process which will not offload its task to the already running instance: see -env:UserInstallation sample in help . Note that, although you may use empty temp directory each time for the task, it will create significant overhead because of the need to initialize new profile; so better create a dedicated profile once, and then reuse it.
> I would argue that it's a big limitation and makes the
> commands usefulness questionable.
... which is why I didn't close it - see first sentence of last paragraph of comment 7.
(In reply to Mike Kaganski from comment #7)
> Possibly there should be passing of the --cat and the like back to the
Yes, that's apparently missing in <https://gerrit.libreoffice.org/plugins/gitiles/core/+/3d318e6cf4a183e14a043840b9990958c7527536%5E!/> "fdo#70625 Add --cat parameter to make git diffs pretty".