How to convert DWG/DXF files to BMP via command line?

**Problem:**How to convert DWG/DXF files to BMP via command line?

Current command:
./dwg2bmp -platform offscreen -width=5000 -height=5000 -antialiasing -recompute-dim -zoom-all -f A.dwg

Issue:
Long processing time for large files, low performance efficiency.

Environment
Linux Centos7
Qcad 3.23.3
A.dwg (7.66 MB)

Very dense hatch patterns cause delays. Your file contains several hatch patterns that are too dense to render. QCAD times out after 2000ms by default per hatch entity. You can lower the timeout in the QCAD interface under:

Edit > Application Preferences > Graphics View > Appearance > Display and Performance > Timeout for Hatch Rendering

Or in the QCAD configuration file (~/.config/QCAD/QCAD3.conf):

[GraphicsView]
MaxHatchTime=1234