Download the PHP package blaspsoft/doxswap without Composer
On this page you can find all versions of the php package blaspsoft/doxswap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blaspsoft/doxswap
More information about blaspsoft/doxswap
Files in blaspsoft/doxswap
Package doxswap
Short Description Doxswap is a simple document conversion package for Laravel which uses LibreOffice to convert documents to a variety of formats.
License MIT
Homepage https://github.com/blaspsoft/doxswap
Informations about the package doxswap
Doxswap
A Laravel package for seamless document and image format conversions. Transform between various formats like DOCX -> PDF, HTML -> PDF, PNG -> WEBP, and more popular formats using a simple, elegant API. Powered by LibreOffice for documents and ImageMagick for image processing.
🚀 Features
- 📄 Multiple Format Support – Convert between documents (DOCX, XLSX, ODT) and images (PNG, JPG, WEBP) with ease
- 🚀 Simple API – Easy-to-use interface for all conversion operations
- 💾 Laravel Storage Integration – Works seamlessly with Laravel's filesystem drivers
- ⚡ Efficient Processing – Optimized conversion using LibreOffice and ImageMagick engines
- 🔍 Conversion Tracking – Detailed results including duration and file paths
- 🔒 Secure File Handling – Safe and secure file processing with proper cleanup
- ⚙️ Configurable Settings – Customize paths, storage disks, and conversion options
- 🛡️ Error Handling – Robust exception handling for unsupported formats and conversions
Installation
You can install the package via composer:
You can publish the config file with:
Overview
The config/doxswap.php
file includes:
💾 Storage & Cleanup
input_disk
: Where to read files from (default: 'public')output_disk
: Where to save converted files (default: 'public')perform_cleanup
: Delete input files after conversion (default: false)
📝 File Naming
Configure how output files are named using different strategies:
🛠️ Conversion Drivers
Configure paths for conversion tools:
Default LibreOffice paths by OS:
- 🐧 Linux:
/usr/bin/soffice
- 🍎 macOS:
/Applications/LibreOffice.app/Contents/MacOS/soffice
- 🪟 Windows:
C:\Program Files\LibreOffice\program\soffice.exe
📄 File Types
Supports various document formats including:
- Documents: DOC, DOCX, ODT, RTF, TXT
- Spreadsheets: XLS, XLSX, ODS, CSV
- Presentations: PPT, PPTX, ODP
- Images: JPG, PNG, SVG, BMP, TIFF, WEBP, GIF
- Web: HTML, XML
- Other: PDF
Usage
Requirements
LibreOffice & ImageMagick
This package requires LibreOffice, ImageMagick, and Potrace to be installed on your system. Here's how to install them:
Ubuntu/Debian
macOS
Windows
Docker
If you're using Docker, you can add the required dependencies to your container:
PHP Requirements
- PHP >= 8.1
- ext-fileinfo
- ext-imagick
- Laravel >= 9.0
🔁 Supported Conversions by Category
📝 Documents
From | Supported Conversions |
---|---|
DOCX | PDF ✅✅, ODT, RTF, TXT, HTML, XML, EPUB |
DOC | PDF ✅✅, DOCX, ODT, RTF, TXT, HTML, XML, EPUB |
ODT | PDF, DOCX, RTF, TXT, HTML, XML |
RTF | PDF, DOCX, ODT, TXT, HTML, XML |
TXT | PDF, DOCX, ODT, HTML, XML |
HTML | PDF, ODT, TXT |
XML | PDF, DOCX, ODT, TXT, HTML |
📊 Spreadsheets
From | Supported Conversions |
---|---|
XLSX | PDF ✅✅, ODS, CSV |
XLS | PDF, XLSX, ODS, CSV |
ODS | PDF, XLSX, CSV |
CSV | PDF, XLSX, ODS |
🎯 Presentations
From | Supported Conversions |
---|---|
PPTX | PDF ✅✅, ODP |
PPT | PDF, PPTX, ODP |
ODP | PDF, PPTX |
🖼️ Images
From | Supported Conversions |
---|---|
PNG | PDF ✅, JPG, SVG, TIFF, WEBP, GIF, BMP |
JPG | PDF ✅, PNG, SVG, TIFF, WEBP, GIF, BMP |
SVG | PDF, PNG, JPG, TIFF, WEBP, GIF, BMP |
BMP | PDF, PNG, JPG, SVG, TIFF, WEBP, GIF |
TIFF | PDF, PNG, JPG, SVG, WEBP, GIF, BMP |
WEBP | PDF, PNG, JPG, SVG, TIFF, GIF, BMP |
GIF | PDF, PNG, JPG, SVG, TIFF, WEBP, BMP |
Legend 🔍
- ✅✅ = Common high-priority conversion
- ✅ = Popular supported format
- (unlisted) = Conversion not supported
Note: Document conversions are performed using LibreOffice in headless mode, while image format conversions utilize ImageMagick 🚀
🤝 Sponsors
If you find this package helpful, please consider sponsoring the development:
License
Blasp is open-sourced software licensed under the MIT license.
All versions of doxswap with dependencies
blaspsoft/onym Version ^1.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0