Download the PHP package mattmy/laravel-dwg-converter without Composer

On this page you can find all versions of the php package mattmy/laravel-dwg-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-dwg-converter

Laravel DWG Converter

繁體中文

Laravel DWG Converter lets Laravel applications extract embedded thumbnails from DWG files and convert DWG files to DXF, structural JSON, PNG, JPEG, or WebP.

Features

Requirements

Requirement Supported
PHP 8.3 or later
Laravel 12 or 13
CI-tested combinations PHP 8.3–8.5 with Laravel 12–13, including the PHP 8.3 / Laravel 12 lowest boundary

External commands are feature-specific. You do not need LibreOffice or ImageMagick when you only extract thumbnails, create DXF, or export JSON.

External commands by operation

Operation Required commands
Dwg::thumbnail(...)->extract() LibreDWG dwgbmp
Dwg::toDxf(...)->convert() LibreDWG dwg2dxf
Dwg::toJson(...)->convert() LibreDWG dwgread with JSON output support
Dwg::toImage(...)->convert() LibreDWG dwg2dxf, LibreOffice 7.4+ soffice, ImageMagick 7 magick

The package does not download or bundle these tools. For LibreDWG installation, see the official LibreDWG repository. The external tools guide covers LibreOffice and ImageMagick installation on Ubuntu/Debian, RHEL/Fedora, and Windows.

Installation

Install the package with Composer:

If a required command is not on PATH, publish the configuration and provide its absolute path:

Quick start

This example extracts the DWG's embedded preview and streams it to Laravel's default disk. The source is an UploadedFile from a validated request.

A DWG may not contain an embedded thumbnail. Use image conversion when you need a rendered preview:

Inputs and outputs

Every operation accepts a valid UploadedFile, a local absolute path, or bytes explicitly wrapped with DwgBinary::from($bytes). A plain string is always treated as a path.

Each successful operation returns a one-time DwgOutput:

Errors and operational limits

Failures use LibreDwgUnavailable, InvalidDwg, or DwgOperationFailed. Each exception provides a stable reason() and sanitized scalar context().

The default limits are 200 MiB input, 512 MiB general output, and 64 MiB JSON output. Set a byte limit to null, zero, or a negative integer to disable it. Keep positive limits and run untrusted DWG conversions in a resource-limited worker or container.

Successful conversion means the configured tools completed the requested operation and the artifact passed the package's format checks. It is not a DWG safety certification, a full conformance check, or an AutoCAD visual-fidelity guarantee.

Documentation

Read the complete English and Traditional Chinese documentation at mattmy.github.io/laravel-dwg-converter-doc.

Changelog

See CHANGELOG.md for the version history.

License

Laravel DWG Converter is released under the MIT License. LibreDWG is GPLv3+ software installed and distributed separately. LibreOffice and ImageMagick are also installed separately under their own licenses.


All versions of laravel-dwg-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/filesystem Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
symfony/process Version ^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mattmy/laravel-dwg-converter contains the following files

Loading the files please wait ...