Convert docx to pdf without showing track changes

Is there any way to disable printing track changes while converting to pdf from command line like:

libreoffice --convert-to pdf document.docx

This is a for headless conversion server receiving docx from an external database, UI solutions are not applicable.

How the LO can decide that you want reject or accept the changes - without seeing them?

Ask the author to send the document without tracking changes.

2 Likes

My company (improperly, if you want) uses track changes to visualise differences bertween revisions. I cannot get them to change this.

I was looking into a way to disable “show track changes” on conversion, but a way to accept all changes programmatically would also work.

Maybe you can do it (by some API macros) BEFORE the conversion.
The deleted/inserted/reformatted parts - after disable the “show track changes” - will be appeared as if you accepted it the changes.

No.

The headless command line options (mainly, --convert-to) are designed to do conversions as close as possible to the original documents. They are not designed to modify documents, but - ideally - to create exact copy of input document, just in a different format. Indeed, the input and output formats impose restrictions: some features may be unsupported in a format, or be implemented differently (so e.g. some values couldn’t be converted without some loss), or have bugs or unimplemented stuff in the filter code … but all that does not change the main idea: the program does not try to edit the document during the conversion process, everything that is supported in the output format must be preserved. That, of course, applies to tracked changes.

You may use some intermediate format without respective support (with additional data loss due to extra double conversion), or you may need to use UNO scripting instead of --convert-to to manipulate the documents in any way you like.

2 Likes

To be more precise, I was not looking into editing the document, just disabling “show tracked changes” before printing. Will rather try UNO scripting to accept all changes, then print.