定制 kwizer15/pdf-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kwizer15/pdf-bundle

Composer 安装命令:

composer require kwizer15/pdf-bundle

包简介

PDF library for Symfony2

关键字:

README 文档

README

Build Status

Installation

  1. Install KwizerPdfBundle
  2. Enable the bundle

Install KwizerPdfBundle

Add the following dependency to your composer.json file:

{
    "require": {
        "kwizer15/pdf-bundle": "1.0.*"
    }
}

Update vendors

$ php composer.phar update

Enable the bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Kwizer\PdfBundle\KwizerPdfBundle(),
    );
}

Using the bundle

Hello World

The document

<?php
// src/Acme/DemoBundle/PdfDocument/MyPdf.php

namespace Acme\DemoBundle\PdfDocument;

class MyDocument extends \Kwizer\PdfBundle\Core\AbstractPdfDocument
{
	public function buildContent()
	{
		$this->builder->cell('Hello World !!!');
	}
}

Controller

<?php
// src/Acme/DemoBundle/Controller/MyController.php

...
use Symfony\Component\HttpFoundation\Response;
use Acme\DemoBundle\PdfDocument\MyDocument;

class MyController extends Controller
{
	public function myAction()
	{
		$response = new Response();
		$response->headers->set('Content-Type', 'application/pdf');
		$response->headers->set('Content-Disposition', 'inline; filename=my.pdf');
		$pdf = $this->get('kwizer.pdf.factory')->createPdf(new MyDocument());
		$response->setContent($pdf);
	
		return $response;
	}
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPLv2
  • 更新时间: 2014-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固