Converting dxf to png in terminal at a higher resolution

I’m currently using the following command to convert dxf to png in terminal:

libreoffice --headless --convert-to png "file_name.dxf"

How can I increase the resolution on my output PNG? It’s currently locked to 816x1056.
Thank you!

I am having the same issue when converting odg to png using this command:

lodraw --convert-to png test.odg

There’s no way to specify resolution, it is always 816x1056. I was able to find three potential solutions:

  1. If you are starting with a libreoffice document, you can change page size in Page/Page Properties and scale all the elements in the document.

  2. Convert to svg, then png (but note that svg does not support features such as dotted lines):

    lodraw --convert-to svg test.odg
    convert -density 500 test.svg test.png

  3. Convert to pdf, then png:

    lodraw --convert-to pdf test.odg
    pdftoppm -png -r 500 test.pdf test

The simple command line conversion IMHO doesn’t provide means to specify these properties. However, you could use unoconv (Universal Office Converter) (and probably a name game on the LibreOffice/OOo UNO API that it uses to convert documents). It’s available in most Linux distributions, for Windows you’d have to download source and use a proper Python environment, see its GitHub page. Releases on GitHub are rather old, source code is newer.

With unoconv you could use the export options -e Width=1298 -e Height=1024 or any other, so an example command line would be

unoconv -f png -e Width=1298 -e Height=1024 filename.dxf