datadebasa/array2print 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

datadebasa/array2print

最新稳定版本:v1.2

Composer 安装命令:

composer require datadebasa/array2print

包简介

A PHP library to convert array data into PDF with table and signature

README 文档

README

A PHP library to convert array data into PDF with table and signature section.

Installation

You can install the library using Composer:

composer require datadebasa/array2print

Usage

Here's a simple example of how to use the library:

<?php

require 'vendor/autoload.php';

use DataDebasa\Array2Print\Array2Print;

// Sample data
$data = [
    ['id' => 1, 'name' => 'John Doe', 'email' => 'john@example.com'],
    ['id' => 2, 'name' => 'Jane Smith', 'email' => 'jane@example.com'],
];

// Headers for the table
$headers = [
    'id' => 'ID',
    'name' => 'Name',
    'email' => 'Email'
];

// Create PDF
$pdf = new Array2Print();
$pdf->setData($data)
    ->setHeaders($headers)
    ->setSignature('John Manager', 'Manager')
    ->generate()
    ->output('report.pdf');

Features

  • Convert array data to PDF table
  • Customizable headers
  • Signature section with name and title
  • Automatic table formatting
  • Downloadable PDF output

Requirements

  • PHP 7.4 or higher
  • TCPDF library (automatically installed via Composer)

License

This project is licensed under the MIT License.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-04-23