PHPackages                             toolreport/core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. toolreport/core

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

toolreport/core
===============

PDF Designer for Laravel — template management, layout engine, dual PDF rendering (DomPDF + Composite TCPDF)

0.1.5(yesterday)011↑2900%MITPHP ^8.3

Since Jul 19Compare

[ Source](https://github.com/devdevrevolution/ToolReportCore)[ Packagist](https://packagist.org/packages/toolreport/core)[ Docs](https://github.com/toolreport/core)[ RSS](/packages/toolreport-core/feed)WikiDiscussions Synced today

READMEChangelogDependencies (5)Versions (7)Used By (0)

ToolReport Core
===============

[](#toolreport-core)

[📖 Documentación en Español](docs/es.md) · [English docs below](#requirements)

PDF Designer for Laravel — template management, visual layout engine, and dual PDF rendering (DomPDF + TCPDF composite engine).

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 13+
- DomPDF (`barryvdh/laravel-dompdf`)
- TCPDF composite engine (`tecnickcom/tc-lib-pdf`)

Installation
------------

[](#installation)

```
composer require toolreport/core
```

Publish configuration and run migrations:

```
php artisan pdf-designer:install
```

Or publish manually:

```
# Config
php artisan vendor:publish --tag=pdf-designer-config

# Migrations
php artisan vendor:publish --tag=pdf-designer-migrations
```

PDF Designer
------------

[](#pdf-designer)

The visual designer is a Vue 3 application included in the package. After installing the PHP package, build and configure the frontend:

### Setup

[](#setup)

```
# Install the package
composer require toolreport/core

# Run the installer (publishes config, migrations, and views)
php artisan pdf-designer:install --with-assets
```

### Vite Configuration

[](#vite-configuration)

Add the designer entry point and `@` alias to your `vite.config.ts`:

```
import { defineConfig } from 'vite'
import laravel from 'laravel-vite-plugin'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath } from 'url'

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'vendor/toolreport/core/designer/src/main.ts',
            ],
            refresh: true,
        }),
        vue(),
        tailwindcss(),
    ],
    resolve: {
        alias: {
            '@': fileURLToPath(
                new URL('./vendor/toolreport/core/designer/src', import.meta.url),
            ),
        },
    },
})
```

### Install Dependencies

[](#install-dependencies)

```
npm install -D vue @vitejs/plugin-vue
npm install pinia axios vue-router
```

### Tailwind v4

[](#tailwind-v4)

Tell Tailwind to scan the designer source files. Add this line to your `resources/css/app.css`:

```
@source "../../vendor/toolreport/core/designer/src/**/*.{vue,ts,js}";
```

### Build

[](#build)

```
npm run build
```

### Access

[](#access)

Navigate to `http://your-app.com/pdf-designer`

### Customizing the View

[](#customizing-the-view)

Publish the Blade view to customize it:

```
php artisan vendor:publish --tag=pdf-designer-views
```

This publishes `resources/views/vendor/pdf-designer/pdf-designer.blade.php` to your app.

Configuration
-------------

[](#configuration)

After publishing, edit `config/pdf-designer.php`:

```
// API prefix (default: api/pdf-designer)
'api_prefix' => env('PDF_DESIGNER_API_PREFIX', 'api/pdf-designer'),

// Storage disk for generated PDFs
'storage' => [
    'disk' => env('PDF_DESIGNER_STORAGE_DISK', 'local'),
    'path' => env('PDF_DESIGNER_STORAGE_PATH', 'pdf-documents'),
],

// PDF engine selection per template
'pdf-engine' => [
    'enabled' => env('PDF_DESIGNER_PDF_ENGINE_ENABLED', true),
    'default_font' => env('PDF_DESIGNER_PDF_ENGINE_FONT', 'dejavusans'),
],
```

Usage
-----

[](#usage)

### Programmatic (Facade)

[](#programmatic-facade)

```
use Toolreport\Core\Facades\PdfDesigner;
use Toolreport\Core\Models\PdfTemplate;

$template = PdfTemplate::find(1);

// Render a single template
$document = PdfDesigner::renderTemplate($template, [
    'company' => 'Acme Corp',
    'total' => '$1,234.56',
], 'Invoice #1001');

// The returned PdfDocument has file_path and file_size
echo $document->file_path; // e.g. pdf-documents/acme-corp_1.pdf
```

### API Routes

[](#api-routes)

Routes are auto-loaded by the service provider under the configured prefix (default: `api/pdf-designer`).

#### Templates

[](#templates)

MethodEndpointDescription`GET``/templates`List all templates`POST``/templates`Create a template`GET``/templates/{id}`Show a template`PUT``/templates/{id}`Update a template`DELETE``/templates/{id}`Delete a template`POST``/templates/{id}/duplicate`Duplicate a template`POST``/templates/{id}/generate`Generate a PDF from template#### Documents

[](#documents)

MethodEndpointDescription`GET``/templates/{id}/documents`List documents for a template`GET``/documents/{id}`Show a document`GET``/documents/{id}/download`Download a PDF document#### Compositions (Multi-page reports)

[](#compositions-multi-page-reports)

MethodEndpointDescription`GET``/compositions`List all compositions`POST``/compositions`Create a composition`GET``/compositions/{id}`Show a composition`PUT``/compositions/{id}`Update a composition`DELETE``/compositions/{id}`Delete a composition`POST``/compositions/{id}/generate`Generate a combined PDF#### Template Variables

[](#template-variables)

MethodEndpointDescription`GET``/templates/{id}/template-vars`List variables`POST``/templates/{id}/template-vars`Create a variable`PUT``/templates/{id}/template-vars/{varId}`Update a variable`DELETE``/templates/{id}/template-vars/{varId}`Delete a variable#### Datasource Testing

[](#datasource-testing)

MethodEndpointDescription`POST``/templates/{id}/datasources/test`Test a datasource connection#### Health Check

[](#health-check)

MethodEndpointDescription`GET``/health`API health checkPDF Engines
-----------

[](#pdf-engines)

ToolReport Core supports two rendering engines:

- **DomPDF** (default) — HTML-to-PDF rendering via `barryvdh/laravel-dompdf`. Good for simple layouts.
- **PDF Engine** (TCPDF composite) — Component-based rendering via `tecnickcom/tc-lib-pdf`. Better for complex layouts with precise positioning.

Set the engine per template via the `engine` field (`dompdf` or `pdf-engine`).

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/72c5744029f40243dc0622b99d4146a5987688b90e1202685d49b2aa054c79ba?d=identicon)[devdevrevolution](/maintainers/devdevrevolution)

---

Tags

laravelpdfTCPDFdompdfreporttemplateslayoutdesigner

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/toolreport-core/health.svg)

```
[![Health](https://phpackages.com/badges/toolreport-core/health.svg)](https://phpackages.com/packages/toolreport-core)
```

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.4k99.4M403](/packages/barryvdh-laravel-dompdf)[elibyy/tcpdf-laravel

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3632.9M8](/packages/elibyy-tcpdf-laravel)[jimmyjs/laravel-report-generator

Rapidly Generate Simple Pdf &amp; Excel Report on Laravel 5 (Using Barryvdh/DomPdf or Barryvdh/laravel-snappy &amp; maatwebsite/excel)

580165.5k1](/packages/jimmyjs-laravel-report-generator)[renatio/dynamicpdf-plugin

October HTML to PDF converter using dompdf library.

3013.5k3](/packages/renatio-dynamicpdf-plugin)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)[samuelterra22/laravel-report-generator

Rapidly Generate Simple Pdf, Excel &amp; CSV Reports on Laravel (Using Barryvdh/DomPdf or Barryvdh/laravel-snappy &amp; maatwebsite/excel)

136.2k](/packages/samuelterra22-laravel-report-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
