Code or command-line for converting ODG (open document graphic) to PNG, JPEG, etc? (Windows and/or macOS)

395 Views Asked by At

I've spent many hours searching for open-source code or utilities (other than the full LibreOffice suite) that would let me convert an ODG (Open Document Graphic) image to any standard format like PNG or JPEG. I'm hoping to find such a tool for both Windows and macOS, but would be grateful to have a tool for one or the other if I can't have both.

I know that I can install LibreOffice and run soffice -headless -invisible -convert-to etc. to do this job, and I know that it can be done with LibreOffice running as a service. But I'm trying to find something that I can distribute to other users without requiring them to install LibreOffice (or some earlier equivalent like OpenOffice, etc.).

I also know that many online converters exist, but I am looking for a command-line tool that won't expose a user's files to third parties who may snoop on the data.

Does such a command-line tool or library exist?

1

There are 1 best solutions below

1
JohnSUN On

Please try command line in form

soffice --headless --nologo --nofirststartwizard --norestore  --convert-to jpg:draw_jpg_Export "full_path_and_filename_source_draw_document.odg" --outdir path_to_output_folder

Name of filter can be draw_png_Export or any other