Seamless Document Conversion in Laravel With Docswap

Mar 10, 2025
Doxswap is a Laravel package for seamless document conversion using LibreOffice. It effortlessly converts DOCX, PDF, ODT, and more with a simple, elegant API. It supports Laravel storage, configurable settings, and secure file handling.  
$convertedFile = Doxswap::convert('sample.docx', 'pdf');
 
/**
* Returns a Doxswap object with the following properties:
*
* @property string $inputFile The original input filename
* @property string $outputFile The full path to the converted output file
* @property string $toFormat The format the file was converted to (e.g. 'pdf')
* @property ConversionService $conversionService The service used for conversion
*/
At the time of writing, Docswap supports the following conversions:
  • Documents: DOC, DOCX, ODT, RTF, TXT
  • Spreadsheets: XLS, XLSX, ODS, CSV
  • Presentations: PPT, PPTX, ODP
  • Images: JPG, PNG, SVG, BMP, TIFF
  • Web: HTML, XML
  • Other: PDF, EPUB

Main Features

  • Multiple Format Support – Convert between DOCX, PDF, ODT, and other document formats.
  • Simple API – Easy-to-use interface for document conversion operations.
  • Laravel Storage Integration – Works seamlessly with Laravel's filesystem drivers.
  • Efficient Processing – Optimized conversion using LibreOffice's powerful engine.
  • Secure File Handling – Safe and secure document processing with proper cleanup.
  • Configurable Settings – Customize paths, storage disks, and conversion options.
  • Error Handling – Robust exception handling for unsupported formats and conversions.
Docswap requires the LibreOffice, which is available on Linux, MacOS, and Windows. You can learn more about this package, get full installation instructions, and view the source code on GitHub.
Related Articles

You Might Also Like

Explore more articles on similar topics

Why Laravel Still Wins for Fast MVPs
PalladiumHub Team Oct 23, 2026
Why Laravel Still Wins for Fast MVPs

A look at why Laravel remains our go-to framework for shipping production-ready products quickly.Lorem ipsum dolor sit amet, consectetur adipiscing el...

Read More
Design Systems: Ship UI Faster
PalladiumHub Team Oct 14, 2026
Design Systems: Ship UI Faster

How a small set of tokens and components can cut design-to-dev time in half.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere e...

Read More
Cloud Costs: 5 Easy Wins
PalladiumHub Team Oct 05, 2026
Cloud Costs: 5 Easy Wins

Practical ways we cut monthly AWS bills by 30% without hurting performance.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere er...

Read More