External tools
Laravel DWG Converter runs locally installed command-line tools. They are not remote services and are not downloaded or bundled by the package. Install only the commands required by the operation you use.
Requirements by operation
| Public operation | Result | Required commands |
|---|---|---|
Dwg::thumbnail(...)->extract() | Embedded BMP, PNG, or WMF preview | LibreDWG dwgbmp |
Dwg::toDxf(...)->convert() | ASCII DXF | LibreDWG dwg2dxf |
Dwg::toJson(...)->convert() | LibreDWG structural JSON | LibreDWG dwgread with JSON output |
Dwg::toImage(...)->convert() | PNG, JPEG, or WebP preview | LibreDWG dwg2dxf, LibreOffice 7.4+ soffice, ImageMagick 7 magick |
Calling toDxf(), toJson(), or thumbnail() does not require LibreOffice or ImageMagick.
LibreDWG
For installation, follow the official LibreDWG repository. Use a maintained, security-patched build that provides the command required by your operation.
Verify the commands you plan to use:
dwgbmp --version
dwg2dxf --version
dwgread --versionIf they are not on PATH, set their absolute paths:
LIBREDWG_DWGBMP=/absolute/path/to/dwgbmp
LIBREDWG_DWG2DXF=/absolute/path/to/dwg2dxf
LIBREDWG_DWGREAD=/absolute/path/to/dwgreadA version string such as 0.14 does not identify its patch level. Confirm the build's provenance and security fixes instead of treating the abbreviated string as proof.
LibreOffice
LibreOffice is required only by toImage(). Version 7.4 or later is required because image output includes WebP.
Ubuntu and Debian
sudo apt update
sudo apt install libreoffice
soffice --versionConfirm that the installed version is 7.4 or later.
RHEL and Fedora
First check whether your enabled repositories provide LibreOffice 7.4 or later. If they do, install the distribution package and verify it:
sudo dnf install libreoffice
soffice --versionRHEL installations do not all expose the same package set. If that command is unavailable, download the Red Hat-family RPM archive from the official LibreOffice download page, extract it, install the RPMs from its RPMS directory, and configure the resulting soffice absolute path.
Windows
Install LibreOffice from the official download page. Point the package to the console launcher, normally:
DWG_CONVERTER_LIBREOFFICE=C:/Program Files/LibreOffice/program/soffice.comUse soffice.com, not soffice.exe: the GUI launcher can report success without producing headless output. Also configure a short absolute temporary_directory to avoid Windows path-length failures.
ImageMagick
ImageMagick is required only by toImage(). The package requires ImageMagick 7 and its magick command; PHP ext-imagick and an ImageMagick 6-only convert command do not satisfy this requirement.
Ubuntu and Debian
Check your distribution's package version before installing. Ubuntu 24.04's imagemagick package provides ImageMagick 6, so sudo apt install imagemagick there does not provide the required ImageMagick 7 magick command.
When your repository provides ImageMagick 7, install it and verify the result:
sudo apt install imagemagick
magick --versionOtherwise use the ImageMagick 7 AppImage from the official download page or follow the official source installation guide. Configure the downloaded or installed executable's absolute path if it is not on PATH.
RHEL and Fedora
Likewise, verify the repository's major version before relying on its package:
sudo dnf install ImageMagick
magick --versionIf the repository installs ImageMagick 6 or does not provide magick, use the official ImageMagick 7 AppImage or source installation linked above.
Windows
Use the official ImageMagick installer, then verify magick.exe:
magick --versionIf it is not on PATH, set:
DWG_CONVERTER_IMAGEMAGICK=C:/Program Files/ImageMagick-7.x.x-Q16-HDRI/magick.exeIn every environment, magick --version must report ImageMagick 7. Review ImageMagick's security policy before processing untrusted files.
Installation checklist
Thumbnail only → dwgbmp
DXF only → dwg2dxf
JSON only → dwgread with JSON output
Image previews → dwg2dxf + soffice 7.4+ + magick 7
All features → all commands above