定制 eadesignro/module-pdfgenerator 二次开发

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

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

eadesignro/module-pdfgenerator

Composer 安装命令:

composer require eadesignro/module-pdfgenerator

包简介

The best pdf generator for Magento. EaDesign PDF Generator

README 文档

README

Maintainability

Magento 2 Invoice PDF Generator - helps you to customize the pdf templates for Magento 2. If you have an enabled template and a default template for the store you need your template the system will print the pdf template.

B2C Theme demo

How to use the module

Add a new template from the "Add new template" button. This will prompt you with a set of fields.

  • Enable template - you need to enable the template in order to use it;
  • Default template - make the template as default for the current store;
  • Template name - this is for your own information as well as the template description;
  • Template for website - here you select the website you need the template for;
  • The template body, header and footer is where you can add the html that will be transformed into the PDF body;
  • The template CSS filed allows you to create styles for the html like "h1 {color:red;} h2 {color:blue}", do not use the style tag, it is not need. In the body you can also specify html like in the email templates;
  • The template settings are used to shape the template as you need. The "Template file name" can be made from variables as long as they are ok for file naming {{var invoice.increment_id}}-{{var invoice.id}}-file-invoice. The "Template paper orientation" is used to set the pdf as landscape or portrait. If you chose to use the custom format the "Custom height" and "Custom width" in millimeters will be used. The paper orientation and the "Template paper format" will be ignored in this case. If the template has standard format the "Template paper format" will allow you to set the paper in a few formats (A4,A5,A3,Letter and Legal). The other settings are the margins (in millimeters) for the top, right, left and bottom. If the header or footer overlaps over your body increase the top and bottom margins to fix this.

The extension will allow you to harness all the power of the email template system and more. You can add phtml files to your template for very advanced configurations ({Error in template processing} and {Error in template processing}). You can add your own item processing layout so you can output taxes item prices as you want ({{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}).

You can also localize your template using the trans directive.

{{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}{{trans "Once your package ships we will send you a tracking number."}}

Using the extension you are able to change the invoice PDF as you desire. The PDF Generator has multiple features as follows:

  • change the Magento invoice PDF to meet your needs;
  • add custom CSS to your template to further personalize the PDF;
  • add templates for each store with different design and features;
  • change the file name of the PDF file using variables;
  • you can send the invoice as PDF attachment to the invoice mail;
  • you can disable enable the PDF from the system configuration area.

For the variable system you can read the Magento domentation here. We use the exact same system to generate the variables.

Supported Versions

  • Magento 2.1.*
  • Magento 2.2.*
  • Magento 2.3.*

Installation

You can install the module via composer or manually by adding it to the app/code directory. The module is available on packagist.org

Via composer:

composer config repositories.magento2-pdf-generator2 git git@github.com:EaDesgin/magento2-pdf-generator2.git
composer require eadesignro/module-pdfgenerator
php bin/magento setup:upgrade

Requirements

Video install and use

IMAGE ALT TEXT HERE

eadesignro/module-pdfgenerator 适用场景与选型建议

eadesignro/module-pdfgenerator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27.58k 次下载、GitHub Stars 达 69, 最近一次更新时间为 2016 年 06 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 eadesignro/module-pdfgenerator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 eadesignro/module-pdfgenerator 我们能提供哪些服务?
定制开发 / 二次开发

基于 eadesignro/module-pdfgenerator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 27.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 69
  • 点击次数: 8
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 69
  • Watchers: 12
  • Forks: 60
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-06-25