Download the PHP package shoaib3375/php-doc-exporter without Composer

On this page you can find all versions of the php package shoaib3375/php-doc-exporter. 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 php-doc-exporter

PHP Doc Exporter

Latest Version on Packagist

An all-in-one PHP/Laravel library to generate professional documents in PDF, Excel, Word, and CSV formats with specialized support for Bangla Unicode and built-in API Token Security.

🚀 Features


🛠 Installation

You can install the package via composer:

Laravel Setup (Optional)

The package auto-registers in Laravel. Optionally publish the config:

Then configure tokens in .env:

📖 Quick Start

Basic Usage (Plain PHP)

Laravel Controller Example

Using Blade Templates (NEW)

API with Token Authentication


🎨 Blade Template Support

Creating a Blade Template

Create a view file at resources/views/invoice.blade.php:

Using the Template

Benefits


🎨 Advanced Options

PDF Customization

Word/Excel Customization

Data Format

Use associative arrays where keys become column headers:


🔒 API Token Security (Optional)

Using Tokens for Protected Exports

Custom Token Configuration


🇧🇩 Bangla Unicode Support

All formats support Bangla Unicode automatically — no configuration needed.

The package detects Bangla characters in your data and applies the correct font.

PDF

Bangla font (NotoSansBengali) is bundled inside the package — no manual font installation required.

Excel / Word / CSV

These formats use Unicode-native libraries and work out of the box.

Manual font override (optional)

If you need a specific font, you can still pass it explicitly:


📄 API Reference

DocumentExporter

exportFromView(string $format, string $view, array $data = [], array $options = [], string $token = null): string

Generates PDF from Blade template (Laravel only).

Parameters:

Returns: PDF content as string

Throws: InvalidFormatException or InvalidTokenException


export(string $format, array $data, array $options = [], string $token = null): string

Generates document content and returns as string.

Parameters:

Returns: Document content as string

Throws: InvalidArgumentException for invalid format or token


Config

Method Description
canAccessFullApi(string $token): bool Validates main API token
canAccessSafeApi(string $token): bool Validates safe or main token
getMainApiToken(): string Returns primary token
getSafeApiToken(): string Returns secondary token

📜 License

The MIT License (MIT). Please see License File for more information.


All versions of php-doc-exporter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
dompdf/dompdf Version ^2.0
phpoffice/phpspreadsheet Version ^1.28
phpoffice/phpword Version ^1.1
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 shoaib3375/php-doc-exporter contains the following files

Loading the files please wait ...